getTargetSession

Return the innermost target Session of the given Session. If the given
Session is a proxy, it will be unwrapped until a non-proxy Session is
found. Otherwise, the passed-in Session will be returned as-is.

getTransactionalSession

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

Parameters:

cf - the ConnectionFactory to obtain a Session for

existingCon - the existing JMS Connection to obtain a Session for
(may be null)

synchedLocalTransactionAllowed - whether to allow for a local JMS transaction
that is synchronized with a Spring-managed transaction (where the main transaction
might be a JDBC-based one for a specific DataSource, for example), with the JMS
transaction committing right after the main transaction. If not allowed, the given
ConnectionFactory needs to handle transaction enlistment underneath the covers.

getTransactionalQueueSession

Obtain a JMS QueueSession that is synchronized with the current transaction, if any.

Mainly intended for use with the JMS 1.0.2 API.

Parameters:

cf - the ConnectionFactory to obtain a Session for

existingCon - the existing JMS Connection to obtain a Session for
(may be null)

synchedLocalTransactionAllowed - whether to allow for a local JMS transaction
that is synchronized with a Spring-managed transaction (where the main transaction
might be a JDBC-based one for a specific DataSource, for example), with the JMS
transaction committing right after the main transaction. If not allowed, the given
ConnectionFactory needs to handle transaction enlistment underneath the covers.

getTransactionalTopicSession

Obtain a JMS TopicSession that is synchronized with the current transaction, if any.

Mainly intended for use with the JMS 1.0.2 API.

Parameters:

cf - the ConnectionFactory to obtain a Session for

existingCon - the existing JMS Connection to obtain a Session for
(may be null)

synchedLocalTransactionAllowed - whether to allow for a local JMS transaction
that is synchronized with a Spring-managed transaction (where the main transaction
might be a JDBC-based one for a specific DataSource, for example), with the JMS
transaction committing right after the main transaction. If not allowed, the given
ConnectionFactory needs to handle transaction enlistment underneath the covers.

doGetTransactionalSession

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

Parameters:

connectionFactory - the JMS ConnectionFactory to bind for
(used as TransactionSynchronizationManager key)

resourceFactory - the ResourceFactory to use for extracting or creating
JMS resources

startConnection - whether the underlying JMS 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.