Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ConnectionFactoryUtils.DoGetTransactionalSession Method

Obtain a NMS Session that is synchronized with the current transaction, if any.

[Visual Basic]
Public Shared Sub DoGetTransactionalSession( _
   ByVal resourceKey As Object, _
   ByVal resourceFactory As ResourceFactory, _
   ByVal startConnection As Boolean _
)
[C#]
public static ISession DoGetTransactionalSession(
   object resourceKey,
   ResourceFactory resourceFactory,
   bool startConnection
);

Parameters

resourceKey
the TransactionSynchronizationManager key to bind to (usually the ConnectionFactory)
resourceFactory
the ResourceFactory to use for extracting or creating NMS resources
startConnection
whether the underlying Connection approach should be started in order to allow for receiving messages. Note that a reused Connection may already have been started before, even if this flag is
false
.

Return Value

the transactional Session, or

null
if none found

See Also

ConnectionFactoryUtils Class | Spring.Messaging.Nms.Connections Namespace