This section provides a brief overview of the Java Transaction API (JTA) and extensions to the API provided by BEA Systems.
This section discusses the following topics:
WebLogic Server supports the
javax.transaction package and the
javax.transaction.xa package, from Sun Microsystems, Inc., which implement the Java Transaction API (JTA) for Java applications. For more information about JTA, see the Specification published by Sun Microsystems, Inc. For a detailed description of the
javax.transaction.xa interfaces, see the JTA Javadoc.
JTA includes the following components:
javax.transaction.UserTransaction. You use this interface as part of a Java client program or within an EJB as part of a bean-managed transaction.
javax.transaction.TransactionManager. This interface is used by an EJB container as part of a container-managed transaction and uses the
javax.transaction.Transactioninterface to perform operations on a specific transaction.
javax.transaction.Synchronization. These interfaces are accessed only by the transaction manager and cannot be used as part of an applications program.
javax.transaction.xa.XAResource) and to retrieve transaction identifiers (
javax.transaction.xa.Xid). These interfaces are accessed only by the transaction manager and cannot be used as part of an applications program.
Extensions to the Java Transactions API are provided where the JTA specification does not cover implementation details and where additional capabilities are required.
BEA WebLogic provides the following capabilities based on interpretations of the JTA specification:
javax.transaction.TransactionManager) is made available to clients and bean providers through JNDI. This allows clients and EJBs using bean-managed transactions to suspend and resume transactions.
|Note:||A suspended transaction must be resumed in the same server process in which it was suspended.|
javax.transaction.TransactionSynchronizationRegistrysupport—WebLogic Server provides the ability to lookup the
TransactionSynchronizationRegistryobject in JNDI using the standard name of
java:comp/TransactionSynchronizationRegistry. BEA extends support by providing two additional global JNDI names:
weblogic/transaction/TransactionSynchronizationRegistry. For more information, see javax.transaction.TransactionSynchronizationRegistry.
BEA WebLogic provides the following classes and interfaces as extensions to JTA:
The WebLogic JTA transaction manager object supports this interface, which allows XA resources to register and unregister themselves with the transaction manager on startup. It also allows a transaction to be resumed after suspension.
This interface enables resources that do not support the
javax.transaction.xa.XAResource interface to easily integrate with the WebLogic Server transaction manager. The transaction manager supports a variation of the Last Agent two-phase commit optimization that allows a non-XA resource to participate in a distributed transaction. The protocol issues a one-phase commit to the non-XA resource and uses the result of the operation to base the commit decision for the transaction.
For a detailed description of the WebLogic extensions to the
javax.transaction.xa interfaces, see the package description.