O'Reilly logo

WebLogic: The Definitive Guide by Avinash Chugh, Jon Mountjoy

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

Chapter 6. Transactions

A Java program typically will use the JDBC API to access the underlying database in some transactional context. Transactions are used to ensure that multiple operations are executed as an atomic unit, and to maintain a consistent view of data during concurrent access. All JDBC-compliant products are required to offer support for local transactions, including features such as auto-commit, transaction isolation levels, and savepoints (if the product is JDBC 3.0-compliant). Some J2EE services, such as entity beans and transactional JMS message delivery, require distributed transactions that span multiple connections and/or resources.

The Java Transaction API (JTA) provides high-level client access to distributed transactions. This framework defines a transaction manager that controls transaction boundaries and upholds the two-phase commit (2PC) semantics across multiple resource managers. WebLogic Server acts as the Transaction Processing (TP) monitor, providing the runtime support for managing the boundaries of your transactions. It protects the integrity of your transactions and ensures that all resources participating in a transaction are updated correctly, even after a system failure.

This chapter focuses on WebLogic's support for transactions. We look at distributed transactions, transaction attributes, and the role of the 2PC protocol. We examine how the EJB container manages EJBs when they are involved in distributed transactions, and how EJBs can ...

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