Expected transactional behaviour with no PlatformTransactionManager
Spring Framework 2.5.1
What is the expected transactional behaviour of the DefaultMessageListenerContainer when the container is set sessionTransacted=true, but there is not transaction manager defined?
I would have expected the session to have been committed if there were no unchecked exceptions thrown from the message listener, but that is not happening.
The call stack eventually gets to line 485 in the AbstractPollingMessageListenerContainer, and that call to ConnectionFactoryUtils.isSessionTransactional(sess ion, getConnectionFactory()) returns false. This causes the commitIfNecessary (line 664 of AbstractMessageListenerContainer) to not call JmsUtils.commitIfNecessary(session).
So it seems that in this setup with no transactionManager, but with sessionTransacted=true, there is never a commit called on the session.
Is that the expected behaviour or a bug? I suspect it is a bug, personally.
Infor Global Solutions