How does a bean access multiple databases in the same transaction?
Created May 4, 2012
Robert Castaneda In EJB 1.1, the way your EJB accesses multiple databases is the same as for accessing a single database: the datasource is defined in the deployment descriptor and looked up by the EJB using the JNDI environment naming context, that is, java:comp/env.
It is the responsibility of the container/server to handle the transaction context propagation and the synchronization/2PC behavior.
Warning: this functionality, accessing multiple databases in EJB within the same transaction context, is not supported by all products.