[TIBCO.EMS .NET client library 6.0 documentation]
Assembly: TIBCO.EMS (in TIBCO.EMS.dll)
Returns an EMSMSDTCSession. Only EMSDTCSession's will be allowed to
participate in MSDTC distributed transactions.
Namespace:
TIBCO.EMSAssembly: TIBCO.EMS (in TIBCO.EMS.dll)
Syntax
public EMSDTCSession CreateEMSDTCSession() |
Public Function CreateEMSDTCSession As EMSDTCSession |
public: EMSDTCSession^ CreateEMSDTCSession() |
Return Value
An EMSDTCSession
Remarks
The presence of an ambient transaction will cause the session to be automatically enlisted with Microsoft DTC when the session's producer produces or consumer consumes the first message within a transaction scope.
Before producing or consuming messages (from producers/consumers created off this EMSDTCSession) one has to make sure that there is already an ambient transaction started. Please see System.Transactions.TransactionScope or System.Transactions.CommittableTransaction on how to start a an ambient transaction.
![]() | |
---|---|
Example: EMSDTCConnectionFactory fc = new EMSDTCConnectionFactory("tcp://localhost:7222"); fc.ClientId = "test-clientId"; EMSDTConnection dtcConn = fc.CreateEMSDTCConnection(); EMSDTCSession dtcSess = dtcConn.CreateEMSDTCSession(); |