I want to use spring programmatic transaction in JMS application that receive a message from queue. At the same time, I want to include the queue in transactional scope.
Using Spring DefaultMessageListnereContainer and injecting transaction manager in it. However, not sure how will I get the reference of this transaction to programmatically commit or rollback?
I read and understand "processing messages within transactions" here http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/jms.html#jms-tx-participation
My 2 requirements are - 1) XA transactions hence injecting JtaTransactionManager, 2) Use programmatic transactions - here I need help how to get reference to the transaction started by spring in the code so that I can programmatically handle transactions