internal Transaction(DistributedTransaction distributedTransaction) { _isoLevel = distributedTransaction.IsolationLevel; _internalTransaction = new InternalTransaction(this, distributedTransaction); _cloneId = Interlocked.Increment(ref _internalTransaction._cloneCount); }
internal static DistributedTransaction GetTransactionFromExportCookie(byte[] cookie, Guid txId) { throw DistributedTransaction.NotSupported(); }
internal static DistributedTransaction GetDistributedTransactionFromTransmitterPropagationToken(byte[] propagationToken) { throw DistributedTransaction.NotSupported(); }
internal byte[] GetWhereabouts() { throw DistributedTransaction.NotSupported(); }
internal static Transaction GetTransactionFromDtcTransaction(IDtcTransaction transactionNative) { throw DistributedTransaction.NotSupported(); }
internal void ResourceManagerRecoveryComplete(Guid resourceManagerIdentifier) { throw DistributedTransaction.NotSupported(); }
internal DistributedCommittableTransaction CreateTransaction(TransactionOptions options) { throw DistributedTransaction.NotSupported(); }
internal IPromotedEnlistment ReenlistTransaction(Guid resourceManagerIdentifier, byte[] resourceManagerRecoveryInformation, RecoveringInternalEnlistment internalEnlistment) { throw DistributedTransaction.NotSupported(); }
internal static Transaction FindOrCreatePromotedTransaction(Guid transactionIdentifier, DistributedTransaction dtx) { Transaction tx = null; Hashtable promotedTransactionTable = PromotedTransactionTable; lock (promotedTransactionTable) { WeakReference weakRef = (WeakReference)promotedTransactionTable[transactionIdentifier]; if (null != weakRef) { tx = weakRef.Target as Transaction; if (null != tx) { // If we found a transaction then dispose it dtx.Dispose(); return tx.InternalClone(); } else { // an old, moldy weak reference. Let's get rid of it. lock (promotedTransactionTable) { promotedTransactionTable.Remove(transactionIdentifier); } } } tx = new Transaction(dtx); // Since we are adding this reference to the table create an object that will clean that entry up. tx._internalTransaction._finalizedObject = new FinalizedObject(tx._internalTransaction, dtx.Identifier); weakRef = new WeakReference(tx, false); promotedTransactionTable[dtx.Identifier] = weakRef; } dtx.SavedLtmPromotedTransaction = tx; FireDistributedTransactionStarted(tx); return tx; }
// Construct an internal transaction internal InternalTransaction(Transaction outcomeSource, DistributedTransaction distributedTx) { _promotedTransaction = distributedTx; _absoluteTimeout = long.MaxValue; // Store the initial creater as it will be the source of outcome events _outcomeSource = outcomeSource; // Initialize the hash _transactionHash = TransactionManager.TransactionTable.Add(this); // Start the transaction off as active TransactionState.TransactionStateNonCommittablePromoted.EnterState(this); // Until otherwise noted this transaction uses normal promotion. _promoteState = TransactionState.TransactionStateNonCommittablePromoted; }