title: how can I synchronise two transactions of two different projects?
body: <p>I have a java project and from this project i call web service request. Within the request I execute database update queries, and after that, in my local application I execute other update queries. </p>
  
  <p>But I have a problem: if there is any update problem or exception handling in local (second) update, I want to rollback the transaction which is executed in web service request. Briefly, to synchronise, two transactions of the two different application. How can I do it?  </p>
  
  <p>I think, JTA could be solution. But I could not find any structure or example or anything exactly which I can apply to my projects.</p>