Esempio n. 1
0
 internal Transaction(DistributedTransaction distributedTransaction)
 {
     _isoLevel = distributedTransaction.IsolationLevel;
     _internalTransaction = new InternalTransaction(this, distributedTransaction);
     _cloneId = Interlocked.Increment(ref _internalTransaction._cloneCount);
 }
Esempio n. 2
0
 internal static DistributedTransaction GetTransactionFromExportCookie(byte[] cookie, Guid txId)
 {
     throw DistributedTransaction.NotSupported();
 }
Esempio n. 3
0
 internal static DistributedTransaction GetDistributedTransactionFromTransmitterPropagationToken(byte[] propagationToken)
 {
     throw DistributedTransaction.NotSupported();
 }
Esempio n. 4
0
 internal byte[] GetWhereabouts()
 {
     throw DistributedTransaction.NotSupported();
 }
Esempio n. 5
0
 internal static Transaction GetTransactionFromDtcTransaction(IDtcTransaction transactionNative)
 {
     throw DistributedTransaction.NotSupported();
 }
Esempio n. 6
0
 internal void ResourceManagerRecoveryComplete(Guid resourceManagerIdentifier)
 {
     throw DistributedTransaction.NotSupported();
 }
Esempio n. 7
0
 internal DistributedCommittableTransaction CreateTransaction(TransactionOptions options)
 {
     throw DistributedTransaction.NotSupported();
 }
Esempio n. 8
0
 internal IPromotedEnlistment ReenlistTransaction(Guid resourceManagerIdentifier, byte[] resourceManagerRecoveryInformation, RecoveringInternalEnlistment internalEnlistment)
 {
     throw DistributedTransaction.NotSupported();
 }
Esempio n. 9
0
        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;
        }
Esempio n. 10
0
        // 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;
        }