Show / Hide Table of Contents

# Class TransactionContext

##### Inheritance

System.Object
TransactionContext
NetTxTransactionContext

##### 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 class TransactionContext

### Constructors

| Improve this Doc View Source

#### TransactionContext(Session)

##### Declaration

    public TransactionContext(Session session)

##### Parameters

Type | Name | Description
--- | --- | ---
Session | session |

### Fields

| Improve this Doc View Source

#### connection

##### Declaration

    protected readonly Connection connection

##### Field Value

Type | Description
--- | ---
Connection |

| Improve this Doc View Source

#### session

##### Declaration

    protected readonly Session session

##### Field Value

Type | Description
--- | ---
Session |

| Improve this Doc View Source

#### synchronizations

##### Declaration

    protected readonly ArrayList synchronizations

##### Field Value

Type | Description
--- | ---
System.Collections.ArrayList |

### Properties

| Improve this Doc View Source

#### InLocalTransaction

##### Declaration

    public virtual bool InLocalTransaction { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### InTransaction

##### Declaration

    public bool InTransaction { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### TransactionId

##### Declaration

    public TransactionId TransactionId { get; protected set; }

##### Property Value

Type | Description
--- | ---
TransactionId |

### Methods

| Improve this Doc View Source

#### AddSynchronization(ISynchronization)

##### Declaration

    public void AddSynchronization(ISynchronization synchronization)

##### Parameters

Type | Name | Description
--- | --- | ---
ISynchronization | synchronization |

| Improve this Doc View Source

#### Begin()

##### Declaration

    public virtual void Begin()

| Improve this Doc View Source

#### Commit()

##### Declaration

    public virtual void Commit()

| Improve this Doc View Source

#### RemoveSynchronization(ISynchronization)

##### Declaration

    public void RemoveSynchronization(ISynchronization synchronization)

##### Parameters

Type | Name | Description
--- | --- | ---
ISynchronization | synchronization |

| Improve this Doc View Source

#### Rollback()

##### Declaration

    public virtual void Rollback()

| Improve this Doc View Source

#### SignalTransactionCommitted()

##### Declaration

    protected void SignalTransactionCommitted()

| Improve this Doc View Source

#### SignalTransactionRolledBack()

##### Declaration

    protected void SignalTransactionRolledBack()

| Improve this Doc View Source

#### SignalTransactionStarted()

##### Declaration

    protected void SignalTransactionStarted()

### Events

| Improve this Doc View Source

#### TransactionCommittedListener

##### Declaration

    public event SessionTxEventDelegate TransactionCommittedListener

##### Event Type

Type | Description
--- | ---
Apache.NMS.SessionTxEventDelegate |

| Improve this Doc View Source

#### TransactionRolledBackListener

##### Declaration

    public event SessionTxEventDelegate TransactionRolledBackListener

##### Event Type

Type | Description
--- | ---
Apache.NMS.SessionTxEventDelegate |

| Improve this Doc View Source

#### TransactionStartedListener

##### Declaration

    public event SessionTxEventDelegate TransactionStartedListener

##### Event Type

Type | Description
--- | ---
Apache.NMS.SessionTxEventDelegate |