O'Reilly logo

Sams Teach Yourself EJB in 21 Days by Krishna Kothapalli, Ragae Ghaly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Local or Global Transactions in BMT

When coding a bean-managed transaction, you need to decide whether to use Java Database Connectivity (JDBC) for local transaction or the Java Transaction API (JTA) for distributed and global transactions. On Day 9, “Using JDBC to Connect to a Database,” you learned how to use JDBC transactions, and on Day 16, “Understanding J2EE Transactions,” you learned how to use JTA transactions. You also learned that JTA is the approach recommended by the J2EE platform and should be used whenever possible. In the next sections, we'll review both transaction management mechanisms, and discuss the rationale behind using either mechanism for BMT.

Using JDBC Transactions in BMT

A JDBC transaction is controlled by the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required