Interface INetTxSession
The INetTxSession interface extends the capability of Session by adding access to a NMS provider's support for the Distributed Transactions (optional). The transaction support leverages the .NET Frameworks System.Transactions API.
The NMS Provider implements this interface by participating in the current ambient transaction as defined by the System.Transactions.Transaction.Current static member. Whenever a new Transaction is entered the NMS provider should enlist in that transaction. When there is no ambient transaction then the NMS Provider should allow the INetTxSession instance to behave as a session that is in Auto Acknowledge mode.
Calling the Commit or Rollback methods on a INetTxSession instance should throw an exception as those operations are controlled by the Transaction Manager.
The INetTxSession interface is optional. NMS providers are not required to support this interface. This interface is for use by NMS providers to support transactional environments.
Inherited Members
Namespace: Apache.NMS
Assembly: Apache.NMS.dll
Syntax
public interface INetTxSession : ISession, IDisposable
Properties
EnlistsMsDtcNativeResource
Declaration
bool EnlistsMsDtcNativeResource { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Enlist(Transaction)
Enlist the Session in the specified Transaction.
If the Session is already enlisted in a Transaction or there is an Ambient Transaction and the given TX is not that Transaction then an exception should be thrown.
Declaration
void Enlist(Transaction tx)
Parameters
Type | Name | Description |
---|---|---|
System.Transactions.Transaction | tx |