How does a bean access multiple databases in the same transaction?

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.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact