title: How to get transactionManager reference in Spring Programmatic transaction
body: <p>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.</p>
  
  <p>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?</p>
  
  <hr>
  
  <p>I read and understand "processing messages within transactions" here 
  <a href="http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/jms.html#jms-tx-participation" rel="noreferrer">http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/jms.html#jms-tx-participation</a></p>
  
  <p>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</p>