protected void FindAndActivateTransactionContextManager()
        {
            string remoteTransactionId = this.enlistment.RemoteTransactionId;
            TransactionContextManager contextManager = this.state.Lookup.FindTransactionContextManager(remoteTransactionId);

            this.ActivateTransactionContextManager(contextManager);
        }
Exemplo n.º 2
0
 public CoordinatorEnlistment(ProtocolState state, TransactionContextManager contextManager, CoordinationContext context, RequestSecurityTokenResponse rstr) : base(state)
 {
     base.ourContextManager = contextManager;
     this.superiorContext   = context;
     this.superiorRstr      = rstr;
     this.ConfigureEnlistment(context);
     base.stateMachine = new CoordinatorStateMachine(this);
     base.stateMachine.ChangeState(state.States.CoordinatorInitializing);
 }
 public CoordinatorEnlistment(ProtocolState state, TransactionContextManager contextManager, CoordinationContext context, RequestSecurityTokenResponse rstr) : base(state)
 {
     base.ourContextManager = contextManager;
     this.superiorContext = context;
     this.superiorRstr = rstr;
     this.ConfigureEnlistment(context);
     base.stateMachine = new CoordinatorStateMachine(this);
     base.stateMachine.ChangeState(state.States.CoordinatorInitializing);
 }
 public ParticipantEnlistment(ProtocolState state, Enlistment coordinatorEnlistment, TransactionContextManager contextManager) : base(state)
 {
     this.protocol = Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Volatile2PC;
     base.ourContextManager = contextManager;
     base.enlistment = new Enlistment();
     base.enlistment.LocalTransactionId = coordinatorEnlistment.LocalTransactionId;
     base.enlistment.RemoteTransactionId = coordinatorEnlistment.RemoteTransactionId;
     base.enlistment.NotificationMask = Notifications.Volatile | Notifications.TwoPhaseCommit;
     base.enlistment.ProtocolProviderContext = this;
     base.stateMachine = new SubordinateStateMachine(this);
     base.stateMachine.ChangeState(state.States.SubordinateInitializing);
 }
 public void CreateCoordinationContext(Message message, Microsoft.Transactions.Wsat.Messaging.RequestAsyncResult result)
 {
     Microsoft.Transactions.Wsat.Messaging.CreateCoordinationContext create = new Microsoft.Transactions.Wsat.Messaging.CreateCoordinationContext(message, this.state.ProtocolVersion);
     CoordinationContext currentContext = create.CurrentContext;
     if (currentContext == null)
     {
         CompletionEnlistment completion = new CompletionEnlistment(this.state);
         completion.StateMachine.Enqueue(new MsgCreateTransactionEvent(completion, ref create, result));
     }
     else
     {
         TransactionContextManager contextManager = this.state.Lookup.FindTransactionContextManager(currentContext.Identifier);
         if (contextManager == null)
         {
             bool flag;
             contextManager = new TransactionContextManager(this.state, currentContext.Identifier);
             contextManager = this.state.Lookup.FindOrAddTransactionContextManager(contextManager, out flag);
         }
         contextManager.StateMachine.Enqueue(new TransactionContextEnlistTransactionEvent(contextManager, ref create, result));
     }
 }
 public ParticipantEnlistment(ProtocolState state, Enlistment coordinatorEnlistment, TransactionContextManager contextManager) : base(state)
 {
     this.protocol                           = Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Volatile2PC;
     base.ourContextManager                  = contextManager;
     base.enlistment                         = new Enlistment();
     base.enlistment.LocalTransactionId      = coordinatorEnlistment.LocalTransactionId;
     base.enlistment.RemoteTransactionId     = coordinatorEnlistment.RemoteTransactionId;
     base.enlistment.NotificationMask        = Notifications.Volatile | Notifications.TwoPhaseCommit;
     base.enlistment.ProtocolProviderContext = this;
     base.stateMachine                       = new SubordinateStateMachine(this);
     base.stateMachine.ChangeState(state.States.SubordinateInitializing);
 }
 protected TransactionContextEvent(TransactionContextManager contextManager) : base(contextManager)
 {
     this.contextManager = contextManager;
 }
 public TransactionContextCreatedEvent(TransactionContextManager contextManager, Microsoft.Transactions.Wsat.Protocol.TransactionContext context) : base(contextManager)
 {
     this.context = context;
 }
        protected void ActivateTransactionContextManager(TransactionContextManager contextManager)
        {
            TransactionContext context = this.CreateTransactionContext();

            contextManager.StateMachine.Enqueue(new TransactionContextCreatedEvent(contextManager, context));
        }
 protected void ActivateTransactionContextManager(TransactionContextManager contextManager)
 {
     TransactionContext context = this.CreateTransactionContext();
     contextManager.StateMachine.Enqueue(new TransactionContextCreatedEvent(contextManager, context));
 }
 public TransactionContextTransactionDoneEvent(TransactionContextManager contextManager) : base(contextManager)
 {
 }
 public void AddTransactionContextManager(TransactionContextManager contextManager)
 {
     this.Add <string, TransactionContextManager>(this.transactions, this.transactionLock, contextManager.Identifier, contextManager);
 }
 public TransactionContextManager FindOrAddTransactionContextManager(TransactionContextManager contextManager, out bool found)
 {
     return(this.FindOrAdd <string, TransactionContextManager>(this.transactions, this.transactionLock, contextManager.Identifier, contextManager, out found));
 }
 public TransactionContextStateMachine(TransactionContextManager contextManager) : base(contextManager)
 {
     this.contextManager = contextManager;
 }