title: How can I use the same transaction in Spring and an EJB?
body: <p>I have no development experience with Spring, since we're a Java EE shop. However, we are looking into a solution for our needs that runs on Spring and should integrate our existing Java EE solution.</p>
  
  <p>After reading the Spring 3.0.5 documentation, I'm still uncertain how a transaction can be propagated from Spring to an EJB.</p>
  
  <p>For instance, a Spring bean would create a transaction, save some stuff into one database and then hand over the transaction to one of our stateless session beans, which (using JPA) saves some other stuff into another database. And all of this must run under the same transaction, which is committed when the control is returned to the Spring bean.</p>
  
  <p>Also, I'm not clear about the deployment: Would Spring run as a webapp in the EAR that contains the session beans?</p>