public override void OnEvent(MsgCreateTransactionEvent e)
 {
     CompletionEnlistment completion = e.Completion;
     EnlistmentOptions options = completion.CreateEnlistmentOptions(e.Body.Expires, e.Body.ExpiresPresent, e.Body.IsolationLevel, 0, null);
     base.state.TransactionManagerSend.CreateTransaction(completion, options, e);
     e.StateMachine.ChangeState(base.state.States.CompletionCreating);
 }
Пример #2
0
        public override void OnEvent(MsgCreateTransactionEvent e)
        {
            CompletionEnlistment completion = e.Completion;
            EnlistmentOptions    options    = completion.CreateEnlistmentOptions(e.Body.Expires, e.Body.ExpiresPresent, e.Body.IsolationLevel, 0, null);

            base.state.TransactionManagerSend.CreateTransaction(completion, options, e);
            e.StateMachine.ChangeState(base.state.States.CompletionCreating);
        }
        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(MsgCreateTransactionEvent e)
 {
     throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
 }
Пример #5
0
 public virtual void OnEvent(MsgCreateTransactionEvent e)
 {
     throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException());
 }
 public TmCreateTransactionResponseEvent(CompletionEnlistment completion, Status status, MsgCreateTransactionEvent e) : base(completion, status)
 {
     this.e = e;
 }
 public void CreateTransaction(CompletionEnlistment completion, EnlistmentOptions options, MsgCreateTransactionEvent e)
 {
     DebugTrace.Trace(TraceLevel.Info, "Sending CreateTransaction to transaction manager");
     this.propagation.CreateTransaction(completion.Enlistment, options, this.createTransactionResponseCallback, e);
 }
 public void OnEvent(MsgCreateTransactionEvent e)
 {
     DebugTrace.TxTrace(TraceLevel.Info, e.Enlistment.EnlistmentId, "{0}", e);
 }
 public TmCreateTransactionResponseEvent(CompletionEnlistment completion, Status status, MsgCreateTransactionEvent e) : base(completion, status)
 {
     this.e = e;
 }