I need a XA transaction between a JMS queue and a database. To achieve this, I have set the transactionManager of my MessageListenerContainer to a JtaTransactionManager (using jenks library, as I'm not on a J2EE server).
However, when a RuntimeException occurs during the process of a message after the insertion in database, the database transaction is commited anyway and the same message is played again.
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<bean class="org.jencks.factory.TransactionManagerFactoryBean" />
In other words, the JMS transaction is rollbacked but not the database transaction.
Any idea why?
Thank you !