Show / Hide Table of Contents

# Class NetTxConnection

Extends the basic Connection class to provide a transacted Connection instance that operates within the bounds of a .NET Scoped Transaction.

The default Session creation methods of Connection are overriden here to always return a TX capable session instance.

##### Inheritance

System.Object
Connection
NetTxConnection

##### Implements

Apache.NMS.INetTxConnection
Apache.NMS.IConnection
System.IDisposable
Apache.NMS.IStartable
Apache.NMS.IStoppable

##### Inherited Members

Connection.ExceptionListener
Connection.ConnectionInterruptedListener
Connection.ConnectionResumedListener
Connection.ConsumerTransformer
Connection.ProducerTransformer
Connection.UserName
Connection.Password
Connection.ProtocolVersion
Connection.AsyncSend
Connection.AsyncClose
Connection.SendAcksAsync
Connection.AckMode
Connection.ProducerWindowSize
Connection.AlwaysSyncSend
Connection.CopyMessageOnSend
Connection.UseCompression
Connection.MessagePrioritySupported
Connection.OptimizeAcknowledge
Connection.OptimizeAcknowledgeTimeOut
Connection.OptimizedAckScheduledAckInterval
Connection.UseRetroactiveConsumer
Connection.ExclusiveConsumer
Connection.ConsumerFailoverRedeliveryWaitPeriod
Connection.CheckForDuplicates
Connection.TransactedIndividualAck
Connection.NonBlockingRedelivery
Connection.AuditDepth
Connection.AuditMaximumProducerNumber
Connection.MetaData
Connection.BrokerUri
Connection.ITransport
Connection.TransportFailed
Connection.FirstFailureError
Connection.RequestTimeout
Connection.AcknowledgementMode
Connection.DispatchAsync
Connection.WatchTopicAdvisories
Connection.ClientId
Connection.DefaultClientId
Connection.ConnectionId
Connection.BrokerInfo
Connection.BrokerWireFormat
Connection.ResourceManagerId
Connection.RedeliveryPolicy
Connection.PrefetchPolicy
Connection.CompressionPolicy
Connection.Start()
Connection.IsStarted
Connection.Stop()
Connection.CreateSession()
Connection.CreateSession(AcknowledgementMode)
Connection.Close()
Connection.Dispose()
Connection.Dispose(Boolean)
Connection.PurgeTempDestinations()
Connection.SyncRequest(Command)
Connection.SyncRequest(Command, TimeSpan)
Connection.Oneway(Command)
Connection.OnCommand(ITransport, Command)
Connection.DispatchMessage(MessageDispatch)
Connection.OnKeepAliveCommand(ITransport, KeepAliveInfo)
Connection.OnTransportInterrupted(ITransport)
Connection.OnTransportResumed(ITransport)
Connection.CreateLocalTransactionId()
Connection.NextSessionId
Connection.CreateTemporaryDestination(Boolean)
Connection.DeleteTemporaryDestination(IDestination)
Connection.DeleteDestination(IDestination)
Connection.CheckClosedOrFailed()
Connection.CheckClosed()
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 NetTxConnection : Connection, INetTxConnection, IConnection, IDisposable, IStartable, IStoppable

### Constructors

| Improve this Doc View Source

#### NetTxConnection(Uri, ITransport, IdGenerator)

##### Declaration

    public NetTxConnection(Uri connectionUri, ITransport transport, IdGenerator clientIdGenerator)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Uri | connectionUri |
ITransport | transport |
IdGenerator | clientIdGenerator |

### Properties

| Improve this Doc View Source

#### ConfiguredResourceManagerId

##### Declaration

    public Guid ConfiguredResourceManagerId { get; set; }

##### Property Value

Type | Description
--- | ---
System.Guid |

| Improve this Doc View Source

#### RecoveryPolicy

##### Declaration

    public NetTxRecoveryPolicy RecoveryPolicy { get; set; }

##### Property Value

Type | Description
--- | ---
NetTxRecoveryPolicy |

### Methods

| Improve this Doc View Source

#### CreateActiveMQSession(AcknowledgementMode)

##### Declaration

    protected override Session CreateActiveMQSession(AcknowledgementMode ackMode)

##### Parameters

Type | Name | Description
--- | --- | ---
Apache.NMS.AcknowledgementMode | ackMode |

##### Returns

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

##### Overrides

Connection.CreateActiveMQSession(AcknowledgementMode)
| Improve this Doc View Source

#### CreateNetTxSession()

##### Declaration

    public INetTxSession CreateNetTxSession()

##### Returns

Type | Description
--- | ---
Apache.NMS.INetTxSession |

| Improve this Doc View Source

#### CreateNetTxSession(Boolean)

##### Declaration

    public INetTxSession CreateNetTxSession(bool enlistNativeMsDtcResource)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | enlistNativeMsDtcResource |

##### Returns

Type | Description
--- | ---
Apache.NMS.INetTxSession |

| Improve this Doc View Source

#### CreateNetTxSession(Transaction)

##### Declaration

    public INetTxSession CreateNetTxSession(Transaction tx)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Transactions.Transaction | tx |

##### Returns

Type | Description
--- | ---
Apache.NMS.INetTxSession |

| Improve this Doc View Source

#### CreateNetTxSession(Transaction, Boolean)

##### Declaration

    public INetTxSession CreateNetTxSession(Transaction tx, bool enlistNativeMsDtcResource)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Transactions.Transaction | tx |
System.Boolean | enlistNativeMsDtcResource |

##### Returns

Type | Description
--- | ---
Apache.NMS.INetTxSession |

### Implements

Apache.NMS.INetTxConnection
Apache.NMS.IConnection
System.IDisposable
Apache.NMS.IStartable
Apache.NMS.IStoppable