Ejemplo n.º 1
0
        internal override void Aborted(InternalEnlistment enlistment, Exception e)
        {
            if (enlistment.Transaction._innerException == null)
            {
                enlistment.Transaction._innerException = e;
            }

            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);
        }
Ejemplo n.º 2
0
        internal override void EnlistmentDone(InternalEnlistment enlistment)
        {
            // EnlistmentDone should be treated the same as Committed from this state.
            // This eliminates a race between the SPC call and the EnlistmentDone call.

            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            // Make the transaction commit
            enlistment.Transaction.State.ChangeStateTransactionCommitted(enlistment.Transaction);
        }
Ejemplo n.º 3
0
        internal override void Aborted(InternalEnlistment enlistment, Exception e)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            if (enlistment.Transaction._innerException == null)
            {
                enlistment.Transaction._innerException = e;
            }

            // Start the transaction aborting
            enlistment.Transaction.State.ChangeStatePromotedAborted(enlistment.Transaction);
        }
Ejemplo n.º 4
0
        internal override void InDoubt(InternalEnlistment enlistment, Exception e)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            if (enlistment.Transaction._innerException == null)
            {
                enlistment.Transaction._innerException = e;
            }

            // Make the transaction in dobut
            enlistment.Transaction.State.InDoubtFromEnlistment(enlistment.Transaction);
        }
Ejemplo n.º 5
0
        internal override void InDoubt(InternalEnlistment enlistment, Exception e)
        {
            // Transition to the ended state
            DurableEnlistmentEnded.EnterState(enlistment);

            if (enlistment.Transaction._innerException == null)
            {
                enlistment.Transaction._innerException = e;
            }

            // Tell the transaction that the enlistment is InDoubt.  Note that
            // for a transaction that has been delegated and then promoted there
            // are two chances to get a better answer than indoubt.  So it may be that
            // the TM will have a better answer.
            enlistment.Transaction.State.InDoubtFromEnlistment(enlistment.Transaction);
        }
Ejemplo n.º 6
0
 internal override void EnlistmentDone(InternalEnlistment enlistment)
 {
     // Transition to the ended state
     DurableEnlistmentEnded.EnterState(enlistment);
 }
Ejemplo n.º 7
0
 internal override void EnlistmentDone(InternalEnlistment enlistment)
 {
     // Mark the enlistment as done.
     DurableEnlistmentEnded.EnterState(enlistment);
 }