Class NetTxTransactionContext
Implements
System.Transactions.ISinglePhaseNotification
System.Transactions.IEnlistmentNotification
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Apache.NMS.ActiveMQ
Assembly: Apache.NMS.ActiveMQ.dll
Syntax
public sealed class NetTxTransactionContext : TransactionContext, ISinglePhaseNotification, IEnlistmentNotification
Constructors
| Improve this Doc View SourceNetTxTransactionContext(Session)
Declaration
public NetTxTransactionContext(Session session)
Parameters
Type | Name | Description |
---|---|---|
Session | session |
Properties
| Improve this Doc View SourceDtcWaitHandle
Declaration
public WaitHandle DtcWaitHandle { get; }
Property Value
Type | Description |
---|---|
System.Threading.WaitHandle |
InLocalTransaction
Declaration
public override bool InLocalTransaction { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceInNetTransaction
Declaration
public bool InNetTransaction { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
NetTxState
Declaration
public NetTxTransactionContext.TxState NetTxState { get; }
Property Value
Type | Description |
---|---|
NetTxTransactionContext.TxState |
SyncRoot
Declaration
public object SyncRoot { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
| Improve this Doc View SourceBegin()
Declaration
public override void Begin()
Overrides
| Improve this Doc View SourceBegin(Transaction)
Declaration
public void Begin(Transaction transaction)
Parameters
Type | Name | Description |
---|---|---|
System.Transactions.Transaction | transaction |
Commit()
Declaration
public override void Commit()
Overrides
| Improve this Doc View SourceCommit(Enlistment)
Declaration
public void Commit(Enlistment enlistment)
Parameters
Type | Name | Description |
---|---|---|
System.Transactions.Enlistment | enlistment |
InDoubt(Enlistment)
Declaration
public void InDoubt(Enlistment enlistment)
Parameters
Type | Name | Description |
---|---|---|
System.Transactions.Enlistment | enlistment |
InitializeDtcTxContext()
Should be called from NetTxSession when created to check if any TX data is stored for recovery and whether the Broker has matching info stored. If an Transaction is found that belongs to this client and is still alive on the Broker it will be recovered, otherwise the stored data should be cleared.
Declaration
public void InitializeDtcTxContext()
Prepare(PreparingEnlistment)
Declaration
public void Prepare(PreparingEnlistment preparingEnlistment)
Parameters
Type | Name | Description |
---|---|---|
System.Transactions.PreparingEnlistment | preparingEnlistment |
ResetDtcRecovery()
DTC recovery is performed once for each AppDomain per default. In case you want to perform it again during execution of the application you can call this method before. But ensure in this case that no connection is active anymore.
Declaration
public static void ResetDtcRecovery()
Rollback()
Declaration
public override void Rollback()
Overrides
| Improve this Doc View SourceRollback(Enlistment)
Declaration
public void Rollback(Enlistment enlistment)
Parameters
Type | Name | Description |
---|---|---|
System.Transactions.Enlistment | enlistment |
SinglePhaseCommit(SinglePhaseEnlistment)
Declaration
public void SinglePhaseCommit(SinglePhaseEnlistment enlistment)
Parameters
Type | Name | Description |
---|---|---|
System.Transactions.SinglePhaseEnlistment | enlistment |
Implements
System.Transactions.ISinglePhaseNotification
System.Transactions.IEnlistmentNotification