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 ...