Пример #1
0
 void IEnlistmentNotificationInternal.Prepare(
     IPromotedEnlistment preparingEnlistment
     )
 {
     _promotedEnlistment = preparingEnlistment;
     _twoPhaseNotifications.Prepare(PreparingEnlistment);
 }
Пример #2
0
 void IEnlistmentNotificationInternal.InDoubt(
     IPromotedEnlistment enlistment
     )
 {
     _promotedEnlistment = enlistment;
     _twoPhaseNotifications.InDoubt(Enlistment);
 }
Пример #3
0
 void IEnlistmentNotificationInternal.Prepare(
     IPromotedEnlistment preparingEnlistment
     )
 {
     this.promotedEnlistment = preparingEnlistment;
     this.twoPhaseNotifications.Prepare(this.PreparingEnlistment);
 }
Пример #4
0
 void IEnlistmentNotificationInternal.Rollback(
     IPromotedEnlistment enlistment
     )
 {
     this.promotedEnlistment = enlistment;
     this.twoPhaseNotifications.Rollback(this.Enlistment);
 }
Пример #5
0
 void IEnlistmentNotificationInternal.InDoubt(
     IPromotedEnlistment enlistment
     )
 {
     this.promotedEnlistment = enlistment;
     this.twoPhaseNotifications.InDoubt(this.Enlistment);
 }
Пример #6
0
 void IEnlistmentNotificationInternal.Rollback(
     IPromotedEnlistment enlistment
     )
 {
     _promotedEnlistment = enlistment;
     _twoPhaseNotifications.Rollback(Enlistment);
 }
Пример #7
0
 void IEnlistmentNotificationInternal.Prepare(
     IPromotedEnlistment preparingEnlistment
     )
 {
     Debug.Assert(_twoPhaseNotifications != null);
     _promotedEnlistment = preparingEnlistment;
     _twoPhaseNotifications.Prepare(PreparingEnlistment);
 }
        internal override void ChangeStatePromoted(InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment)
        {
            // Save the promoted enlistment because future notifications must be sent here.
            enlistment.PromotedEnlistment = promotedEnlistment;

            // The transaction is being promoted promote the enlistment as well
            EnlistmentStatePromoted.EnterState(enlistment);
        }
Пример #9
0
 void IEnlistmentNotificationInternal.InDoubt(
     IPromotedEnlistment enlistment
     )
 {
     Debug.Assert(_twoPhaseNotifications != null);
     _promotedEnlistment = enlistment;
     _twoPhaseNotifications.InDoubt(Enlistment);
 }
Пример #10
0
 internal virtual bool PromoteDurable(InternalTransaction tx)
 {
     if (tx.durableEnlistment != null)
     {
         InternalEnlistment  durableEnlistment  = tx.durableEnlistment;
         IPromotedEnlistment promotedEnlistment = tx.PromotedTransaction.EnlistDurable(durableEnlistment.ResourceManagerIdentifier, (DurableInternalEnlistment)durableEnlistment, durableEnlistment.SinglePhaseNotification != null, EnlistmentOptions.None);
         tx.durableEnlistment.State.ChangeStatePromoted(tx.durableEnlistment, promotedEnlistment);
     }
     return(true);
 }
Пример #11
0
        void ISinglePhaseNotificationInternal.SinglePhaseCommit(IPromotedEnlistment singlePhaseEnlistment)
        {
            bool spcCommitted = false;

            _promotedEnlistment = singlePhaseEnlistment;
            try
            {
                _singlePhaseNotifications.SinglePhaseCommit(SinglePhaseEnlistment);
                spcCommitted = true;
            }
            finally
            {
                if (!spcCommitted)
                {
                    SinglePhaseEnlistment.InDoubt();
                }
            }
        }
Пример #12
0
        void ISinglePhaseNotificationInternal.SinglePhaseCommit(IPromotedEnlistment singlePhaseEnlistment)
        {
            bool flag = false;

            this.promotedEnlistment = singlePhaseEnlistment;
            try
            {
                this.singlePhaseNotifications.SinglePhaseCommit(this.SinglePhaseEnlistment);
                flag = true;
            }
            finally
            {
                if (!flag)
                {
                    this.SinglePhaseEnlistment.InDoubt();
                }
            }
        }
        internal IPromotedEnlistment EnlistVolatile(ISinglePhaseNotificationInternal singlePhaseNotification, EnlistmentOptions enlistmentOptions)
        {
            if (DiagnosticTrace.Verbose)
            {
                MethodEnteredTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceOletx"), "OletxTransaction.EnlistVolatile( ISinglePhaseNotificationInternal )");
            }
            if ((this.realOletxTransaction == null) || this.realOletxTransaction.TooLateForEnlistments)
            {
                throw TransactionException.Create(System.Transactions.SR.GetString("TraceSourceOletx"), System.Transactions.SR.GetString("TooLate"), null);
            }
            IPromotedEnlistment enlistment = this.realOletxTransaction.EnlistVolatile(singlePhaseNotification, enlistmentOptions, this);

            if (DiagnosticTrace.Verbose)
            {
                MethodExitedTraceRecord.Trace(System.Transactions.SR.GetString("TraceSourceOletx"), "OletxTransaction.EnlistVolatile( ISinglePhaseNotificationInternal )");
            }
            return(enlistment);
        }
Пример #14
0
 internal virtual void ChangeStatePromoted(InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment)
 {
     Debug.Assert(false, string.Format(null, "Invalid Event for InternalEnlistment State; Current State: {0}", GetType()));
     throw TransactionException.CreateEnlistmentStateException(null, enlistment == null ? Guid.Empty : enlistment.DistributedTxId);
 }
Пример #15
0
 public override void InDoubt(IPromotedEnlistment en)
 {
     _promotedEnlistment = en;
     PoolableInDoubt(this);
 }
Пример #16
0
 public override void Commit(IPromotedEnlistment en)
 {
     _promotedEnlistment = en;
     PoolableCommit(this);
 }
Пример #17
0
 internal virtual void ChangeStatePromoted(InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment)
 {
     throw TransactionException.CreateEnlistmentStateException(System.Transactions.SR.GetString("TraceSourceLtm"), null);
 }
 internal virtual void ChangeStatePromoted( InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment )
 {
     Debug.Assert( false, string.Format( null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType() ));
     throw TransactionException.CreateEnlistmentStateException( SR.GetString( SR.TraceSourceLtm ), null );
 }
Пример #19
0
 void IEnlistmentNotificationInternal.Rollback(
     IPromotedEnlistment enlistment
     )
 {
     this.promotedEnlistment = enlistment;
     this.twoPhaseNotifications.Rollback(this.Enlistment);
 }
Пример #20
0
 void ISinglePhaseNotificationInternal.SinglePhaseCommit(
     IPromotedEnlistment singlePhaseEnlistment
     )
 {
     bool spcCommitted = false; 
     this.promotedEnlistment = singlePhaseEnlistment;
     try
     {
         this.singlePhaseNotifications.SinglePhaseCommit(this.SinglePhaseEnlistment);
         spcCommitted = true; 
     }
     finally
     {
         if (!spcCommitted)
         {
             this.SinglePhaseEnlistment.InDoubt();
         }
     }
 }
 public override void InDoubt(IPromotedEnlistment en)
 {
     _promotedEnlistment = en;
     PoolableInDoubt(this);
 }
 public override void Commit(IPromotedEnlistment en)
 {
     _promotedEnlistment = en;
     PoolableCommit(this);
 }
 public abstract void Rollback(IPromotedEnlistment en);
 // Fanout Preprepare notifications
 public abstract void Prepare(IPromotedEnlistment en);
 public abstract void InDoubt(IPromotedEnlistment en);
 public abstract void Commit(IPromotedEnlistment en);
Пример #27
0
 internal virtual void ChangeStatePromoted(InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment)
 {
     Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}");
     throw TransactionException.CreateEnlistmentStateException(null, enlistment == null ? Guid.Empty : enlistment.DistributedTxId);
 }
 public override void Rollback(IPromotedEnlistment en)
 {
     base.oletxEnlistment = en;
     VolatileDemultiplexer.PoolableRollback(this);
 }
 // Fanout Preprepare notifications
 public override void Prepare(IPromotedEnlistment en)
 {
     _preparingEnlistment = en;
     PoolablePrepare(this);
 }
 public override void Rollback(IPromotedEnlistment en)
 {
     _promotedEnlistment = en;
     PoolableRollback(this);
 }
Пример #31
0
 void IEnlistmentNotificationInternal.Prepare(
     IPromotedEnlistment preparingEnlistment
     )
 {
     this.promotedEnlistment = preparingEnlistment;
     this.twoPhaseNotifications.Prepare(this.PreparingEnlistment);
 }
Пример #32
0
 public abstract void Commit(IPromotedEnlistment en);
Пример #33
0
 void IEnlistmentNotificationInternal.InDoubt(
     IPromotedEnlistment enlistment
     )
 {
     this.promotedEnlistment = enlistment;
     this.twoPhaseNotifications.InDoubt(this.Enlistment);
 }
Пример #34
0
 public abstract void InDoubt(IPromotedEnlistment en);
Пример #35
0
 // Fanout Preprepare notifications
 public abstract void Prepare(IPromotedEnlistment en);
Пример #36
0
        internal override void ChangeStatePromoted( InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment )
        {
            // Save the promoted enlistment because future notifications must be sent here.
            enlistment.PromotedEnlistment = promotedEnlistment;

            // The transaction is being promoted promote the enlistment as well
            _EnlistmentStatePromoted.EnterState( enlistment );
        }
Пример #37
0
 public abstract void Rollback(IPromotedEnlistment en);
Пример #38
0
 void IEnlistmentNotificationInternal.InDoubt(
     IPromotedEnlistment enlistment
     )
 {
     _promotedEnlistment = enlistment;
     _twoPhaseNotifications.InDoubt(Enlistment);
 }
Пример #39
0
 // Fanout Preprepare notifications
 public override void Prepare(IPromotedEnlistment en)
 {
     _preparingEnlistment = en;
     PoolablePrepare(this);
 }
 public override void InDoubt(IPromotedEnlistment en)
 {
     base.oletxEnlistment = en;
     VolatileDemultiplexer.PoolableInDoubt(this);
 }
Пример #41
0
 public override void Rollback(IPromotedEnlistment en)
 {
     _promotedEnlistment = en;
     PoolableRollback(this);
 }
 public override void Prepare(IPromotedEnlistment en)
 {
     base.preparingEnlistment = en;
     VolatileDemultiplexer.PoolablePrepare(this);
 }
Пример #43
0
 internal virtual void ChangeStatePromoted(InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment)
 {
     Debug.Assert(false, string.Format(null, "Invalid Event for InternalEnlistment State; Current State: {0}", GetType()));
     throw TransactionException.CreateEnlistmentStateException(null, enlistment == null ? Guid.Empty : enlistment.DistributedTxId);
 }
Пример #44
0
 internal override void ChangeStatePromoted(InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment)
 {
     enlistment.PromotedEnlistment = promotedEnlistment;
     EnlistmentState._EnlistmentStatePromoted.EnterState(enlistment);
 }
Пример #45
0
 void IEnlistmentNotificationInternal.Prepare(
     IPromotedEnlistment preparingEnlistment
     )
 {
     _promotedEnlistment = preparingEnlistment;
     _twoPhaseNotifications.Prepare(PreparingEnlistment);
 }
 internal virtual void ChangeStatePromoted(InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment)
 {
     Debug.Assert(false, string.Format(null, "Invalid Event for InternalEnlistment State; Current State: {0}", this.GetType()));
     throw TransactionException.CreateEnlistmentStateException(SR.GetString(SR.TraceSourceLtm), null);
 }
Пример #47
0
 void IEnlistmentNotificationInternal.Rollback(
     IPromotedEnlistment enlistment
     )
 {
     _promotedEnlistment = enlistment;
     _twoPhaseNotifications.Rollback(Enlistment);
 }
 internal virtual void ChangeStatePromoted(InternalEnlistment enlistment, IPromotedEnlistment promotedEnlistment)
 {
     throw TransactionException.CreateEnlistmentStateException(System.Transactions.SR.GetString("TraceSourceLtm"), null);
 }