Sep 17th, 2007, 02:59 PM
DefaultMessageContainerListener and transactions
I'm trying to use transactions with the DefaultMessageContainerListener. I want to also reuse the same session for sending a message to another destination while processing the input message. Unfortunately, the session is not part of the spring transactional resource if caching is set to SESSION or CONSUMER.
Line 883 (http://springframework.cvs.sourcefor...w=markup#l_883) shows that createSession(getSharedConnection()) is called to create the session for this consumer instead of ConnectionFactoryUtils.doGetTransactionalSession() as done in AbstractPollingMessageListenerContainer.
This prevents the same session to be reused for sending JMS messages. I'd like to consider that a bug... Thoughts ?