public void CreateParticipantService() { EnlistmentHeader refParam = new EnlistmentHeader(base.enlistmentId); this.participantService = base.state.TwoPhaseCommitParticipantListener.CreateEndpointReference(refParam); if (this.coordinatorProxy != null) { this.coordinatorProxy.From = this.participantService; } }
public void OnRootTransactionCreated() { base.enlistmentId = base.enlistment.LocalTransactionId; base.enlistment.RemoteTransactionId = CoordinationContext.CreateNativeIdentifier(base.enlistmentId); EnlistmentHeader refParam = new EnlistmentHeader(base.enlistmentId); this.coordinatorService = base.state.CompletionCoordinatorListener.CreateEndpointReference(refParam); base.ourContextManager = new TransactionContextManager(base.state, base.enlistment.RemoteTransactionId); base.state.Lookup.AddTransactionContextManager(base.ourContextManager); base.ActivateTransactionContextManager(base.ourContextManager); base.AddToLookupTable(); base.VerifyAndTraceEnlistmentOptions(); base.TraceTransferEvent(); }
public void CreateCoordinatorService() { if ((this.protocol != Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Durable2PC) && (this.protocol != Microsoft.Transactions.Wsat.Messaging.ControlProtocol.Volatile2PC)) { Microsoft.Transactions.Bridge.DiagnosticUtility.FailFast("Need protocol for coordinator service"); } EnlistmentHeader refParam = new EnlistmentHeader(base.enlistmentId, this.protocol); this.coordinatorService = base.state.TwoPhaseCommitCoordinatorListener.CreateEndpointReference(refParam); this.participantProxy.From = this.coordinatorService; }
private EndpointAddress CreateForgottenSource() { if (this.forgottenSource == null) { EnlistmentHeader refParam = new EnlistmentHeader(Guid.Empty, ControlProtocol.None); this.forgottenSource = this.state.TwoPhaseCommitCoordinatorListener.CreateEndpointReference(refParam); } return this.forgottenSource; }
protected override void DeserializeExtended() { DebugTrace.TraceEnter(this, "DeserializeExtended"); WsATv1LogEntryVersion version = (WsATv1LogEntryVersion) SerializationUtils.ReadByte(base.mem); if (!Enum.IsDefined(typeof(WsATv1LogEntryVersion), version)) { Microsoft.Transactions.Bridge.DiagnosticUtility.FailFast("Unsupported WsATv1LogEntryVersion"); } WsATv1LogEntryFlags flags = (WsATv1LogEntryFlags) SerializationUtils.ReadByte(base.mem); if (DebugTrace.Verbose) { DebugTrace.Trace(TraceLevel.Verbose, "DeserializeExtended flags: {0}", flags); } this.CheckFlags(flags); if (((byte) (flags & WsATv1LogEntryFlags.OptimizedEndpointRepresentation)) == 0) { base.entry.Endpoint = SerializationUtils.ReadEndpointAddress(base.mem, this.protocolVersion); if (DebugTrace.Verbose) { DebugTrace.Trace(TraceLevel.Verbose, "Read endpoint address: {0}", base.entry.Endpoint.Uri); } } else { int num; string str2; Guid guid = SerializationUtils.ReadGuid(base.mem); if (DebugTrace.Verbose) { DebugTrace.Trace(TraceLevel.Verbose, "Read remote EnlistmentId: {0}", guid); } string str = SerializationUtils.ReadString(base.mem); if (DebugTrace.Verbose) { DebugTrace.Trace(TraceLevel.Verbose, "Read hostName: {0}", str); } if (((byte) (flags & WsATv1LogEntryFlags.UsesDefaultPort)) != 0) { num = 0x944; } else { num = SerializationUtils.ReadInt(base.mem); if (DebugTrace.Verbose) { DebugTrace.Trace(TraceLevel.Verbose, "Read port: {0}", num); } } if (((byte) (flags & WsATv1LogEntryFlags.UsesStandardCoordinatorAddressPath)) != 0) { str2 = WsATv1LogEntrySerializer.StandardCoordinatorAddressPath(this.protocolVersion); } else if (((byte) (flags & WsATv1LogEntryFlags.UsesStandardParticipantAddressPath)) != 0) { str2 = WsATv1LogEntrySerializer.StandardParticipantAddressPath(this.protocolVersion); } else { str2 = SerializationUtils.ReadString(base.mem); if (DebugTrace.Verbose) { DebugTrace.Trace(TraceLevel.Verbose, "Read address path: {0}", str2); } } UriBuilder builder = new UriBuilder(Uri.UriSchemeHttps, str, num, str2); EnlistmentHeader header = new EnlistmentHeader(guid, ControlProtocol.Durable2PC); base.entry.Endpoint = new EndpointAddress(builder.Uri, new AddressHeader[] { header }); } DebugTrace.TraceLeave(this, "DeserializeExtended"); }