title: Multiple (Tomcat + ActiveMQ + Mysql) Transaction Management
body: <p>We have Multiple Tomcat providing web services for our internal product. </p>
  
  <p><strong>Tomcat, Active MQ servers are different</strong></p>
  
  <p>Web services call sequence</p>
  
  <ol>
  <li>Tomcat Receive request</li>
  <li>Start DB Transaction (Spring Transaction)</li>
  <li>Execute some business logic</li>
  <li><p>Generate certain events &amp; push in queue (Active MQ)</p>
  
  <p>Start JMS Transaction</p>
  
  <p>Push in queue</p>
  
  <p>Commit JMS</p></li>
  <li><p>Execute other business logic</p>
  
  <p>(other business logic may generate another event for JMS) </p></li>
  <li><p>Commit DB.</p></li>
  </ol>
  
  <p>So what i want is to start Global Transaction which should take care of committing respective transaction in sequence.</p>
  
  <p>JMS should only get commit if DB is getting commit.</p>
  
  <p>Is it possible with JTA??????</p>
  
  <p>Your suggestions are welcome.</p>