public override void OnEvent(TmCreateTransactionResponseEvent e)
 {
     MsgCreateTransactionEvent sourceEvent = e.SourceEvent;
     CompletionEnlistment completion = e.Completion;
     if (e.Status != Status.Success)
     {
         Fault cannotCreateContext = base.state.Faults.CannotCreateContext;
         base.state.ActivationCoordinator.SendFault(sourceEvent.Result, cannotCreateContext);
         if (CreateTransactionFailureRecord.ShouldTrace)
         {
             CreateTransactionFailureRecord.Trace(completion.EnlistmentId, Microsoft.Transactions.SR.GetString("PplCreateTransactionFailed", new object[] { e.Status.ToString() }));
         }
         completion.StateMachine.ChangeState(base.state.States.CompletionInitializationFailed);
     }
     else
     {
         completion.OnRootTransactionCreated();
         TransactionContext transactionContext = completion.ContextManager.TransactionContext;
         base.state.ActivationCoordinator.SendCreateCoordinationContextResponse(transactionContext, sourceEvent.Result);
         completion.StateMachine.ChangeState(base.state.States.CompletionCreated);
     }
 }
        public override void OnEvent(TmCreateTransactionResponseEvent e)
        {
            MsgCreateTransactionEvent sourceEvent = e.SourceEvent;
            CompletionEnlistment      completion  = e.Completion;

            if (e.Status != Status.Success)
            {
                Fault cannotCreateContext = base.state.Faults.CannotCreateContext;
                base.state.ActivationCoordinator.SendFault(sourceEvent.Result, cannotCreateContext);
                if (CreateTransactionFailureRecord.ShouldTrace)
                {
                    CreateTransactionFailureRecord.Trace(completion.EnlistmentId, Microsoft.Transactions.SR.GetString("PplCreateTransactionFailed", new object[] { e.Status.ToString() }));
                }
                completion.StateMachine.ChangeState(base.state.States.CompletionInitializationFailed);
            }
            else
            {
                completion.OnRootTransactionCreated();
                TransactionContext transactionContext = completion.ContextManager.TransactionContext;
                base.state.ActivationCoordinator.SendCreateCoordinationContextResponse(transactionContext, sourceEvent.Result);
                completion.StateMachine.ChangeState(base.state.States.CompletionCreated);
            }
        }
 public virtual void OnEvent(TmCreateTransactionResponseEvent e)
 {
     this.InvalidTransactionManagerEvent(e);
 }
Ejemplo n.º 4
0
 public virtual void OnEvent(TmCreateTransactionResponseEvent e)
 {
     this.InvalidTransactionManagerEvent(e);
 }
 public void OnEvent(TmCreateTransactionResponseEvent e)
 {
     DebugTrace.TxTrace(TraceLevel.Info, e.Enlistment.EnlistmentId, "{0} {1}", e, e.Status);
 }