@Nullable open static fun doGetTransactionalSession(connectionFactory: ConnectionFactory, resourceFactory: ResourceFactory): Session
Obtain a JMS Session that is synchronized with the current transaction, if any.
This doGetTransactionalSession
variant always starts the underlying JMS Connection, assuming that the Session will be used for receiving messages.
connectionFactory
- the JMS ConnectionFactory to bind for (used as TransactionSynchronizationManager key)
resourceFactory
- the ResourceFactory to use for extracting or creating JMS resources
JMSException
- in case of JMS failure
Return
the transactional Session, or null
if none found
See Also
#doGetTransactionalSession(javax.jms.ConnectionFactory, ResourceFactory, boolean)
@Nullable open static fun doGetTransactionalSession(connectionFactory: ConnectionFactory, resourceFactory: ResourceFactory, startConnection: Boolean): Session
Obtain a JMS Session that is synchronized with the current transaction, if any.
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
.
JMSException
- in case of JMS failure
Return
the transactional Session, or null
if none found