How Transactions Are Performed by WebLogic Server
WebLogic Server can serve as both the application server and transaction manager. It also provides extensions to the JTA and an array configuration and management utilities. Those available to you depend on which type of transaction you're programming.
There are three different approaches to transaction management. The approach to be used depends on whether the transaction is local or global and, in some cases, the type of component:
Resource managers can manage local transactions themselves, which is sufficient in nondistributed applications that utilize a single resource. For example, in JDBC, demarcation is easily managed with the commit and rollback methods of the java.sql.Connection interface.
JTA programmatic transactions—
In distributed environments with global transactions, servlets, RMI applications, MDBs, JavaBeans, and Session EJBs may be managed through the Java Transaction API. Demarcation is managed with the begin, commit, and rollback methods of the javax.transaction.UserTransaction interface.
Demarcation for EJBs may also be managed through the container (as we'll see, all Entity EJBs' transactions must be managed through the container). With container-managed demarcation, the transaction attributes are specified in the deployment descriptor. A transaction is rolled back via the setRollbackOnly method of the javax.ejb.EJBContext interface.