internal OletxTransactionManager(string nodeName) { lock (ClassSyncObject) { if (proxyShimFactory == null) { if (System.Transactions.Oletx.NativeMethods.GetNotificationFactory(ShimWaitHandle.SafeWaitHandle, out proxyShimFactory) != 0) { throw TransactionException.Create(System.Transactions.SR.GetString("TraceSourceOletx"), System.Transactions.SR.GetString("UnableToGetNotificationShimFactory"), null); } ThreadPool.UnsafeRegisterWaitForSingleObject(ShimWaitHandle, new WaitOrTimerCallback(OletxTransactionManager.ShimNotificationCallback), null, -1, false); } } this.dtcTransactionManagerLock = new ReaderWriterLock(); this.nodeNameField = nodeName; if ((this.nodeNameField != null) && (this.nodeNameField.Length == 0)) { this.nodeNameField = null; } if (DiagnosticTrace.Verbose) { DistributedTransactionManagerCreatedTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceOletx"), base.GetType(), this.nodeNameField); } this.configuredTransactionOptions.IsolationLevel = this.isolationLevelProperty = TransactionManager.DefaultIsolationLevel; this.configuredTransactionOptions.Timeout = this.timeoutProperty = TransactionManager.DefaultTimeout; this.internalResourceManager = new OletxInternalResourceManager(this); this.dtcTransactionManagerLock.AcquireWriterLock(-1); try { this.dtcTransactionManager = new System.Transactions.Oletx.DtcTransactionManager(this.nodeNameField, this); } finally { this.dtcTransactionManagerLock.ReleaseWriterLock(); } if (resourceManagerHashTable == null) { resourceManagerHashTable = new Hashtable(2); resourceManagerHashTableLock = new ReaderWriterLock(); } }