title: EJB3.1 - Transactions over multiple applications in the same JVM
body: <p>I've got the following situation:</p>
  
  <ul>
  <li>App1 ear — application that holds some services that do DB work.</li>
  <li>App2 ear — another application that uses App1 services.</li>
  <li>Both are running in the same JVM. The app server is JBoss7.</li>
  <li>App2 does some more DB work before/after calling App1's services. </li>
  </ul>
  
  <p>Let's say in App2 in a service there is a method:</p>
  
  <pre><code>void method(){
     doDBWorkinApp2();
     callApp1ServiceToDoMoreDBWork();
     moreDBWorkinApp2();
  }
  </code></pre>
  
  <p>I want this method to be executed in a single transaction. How can I do that?</p>