4-12 Programming JTA for Oracle WebLogic Server
For instructions on manually migrating the Transaction Recovery Service using the Administration Console, see Manually migrate the Transaction Recovery Service in
the Oracle WebLogic Server Administration Console Help.
4.5.4 How to Remove Transaction Records
Before deleting TLOGs the WebLogic Server instance should be shutdown gracefully to allow the completion of as many transactions as possible.
The location of TLOGs is dependent on whether LLR is a participaging resource in a transaction.
■
When one resource involved in the transaction is a LLR, then the TLOGs are stored in two locations.
–
The transaction records are stored in a database table. See Section 4.5.4.1,
How to Remove the TLOG in the LLR Database.
–
The server and resource checkpoints are stored in the default store. See Section 4.5.4.2, How to Remove the TLOG Files from the Default Store.
■
If there are no participating LLR in the transactions, the transaction records, server checkpoints, and resource checkpoints are all saved to the TLOG file in the
default store. See Section 4.5.4.2, How to Remove the TLOG Files from the Default
Store.
4.5.4.1 How to Remove the TLOG in the LLR Database
Default name of the LLR table is WL_LLR_SERVERNAME, where SERVERNAME is the name of the server instance. See JDBC LLR Table Name in Servers: Configuration:
General in Oracle WebLogic Server Administration Console Help. To delete the LLR TLOG that is kept in the database, remove all the records from the table by issuing
drop table WL_LLR_SERVERNAME
.
Notes: Please note the following:
■
If a backup server fails before completing the transaction recovery actions, the primary server cannot reclaim ownership of the
Transaction Recovery Service and recovery is not re-attempted after the rebooting server. Therefore, you must attempt to
manually re-migrate the Transaction Recovery Service to another backup server.
■
If you restart the original server while the backup server is recovering transactions, the backup server gracefully releases
ownership of the Transaction Recovery Service. You do not need to stop the backup server. See
Section 4.5.3, Recovering Transactions For a Failed Clustered Server
.
Note:
You should delete TLOGs only in an extreme case. Deleting the TLOGs removes transaction records, resulting in heuristic failures.
For example, see Section 4.3, Moving a Server.
Managing Transactions 4-13
4.5.4.2 How to Remove the TLOG Files from the Default Store
To remove the TLOGs in a the default store, delete all files having the following pattern:
DOMAIN_HOMEserversservernamedatastoredefault_WLS_ SERVERNAMExxxxxx.DAT
where xxxxxx are integers ranging from 0 to 9.
Note: If the default store contains a configured JMS file store,
deleting the TLOG also deletes the JMS File Store. In this case, before deleting the TLOG files, first export the JMS messages to another
location. You can then safely delete the TLOG files and import the JMS messages back to the original store. See “Managing JMS
Messages” in Configuring and Managing JMS for Oracle WebLogic Server.
4-14 Programming JTA for Oracle WebLogic Server
5
Transaction Service 5-1
5
Transaction Service
This section provides information used to write transactional applications for the WebLogic Server system.
This section discusses the following topics:
■
Section 5.1, About the Transaction Service
■
Section 5.2, Capabilities and Limitations
■
Section 5.3, Transaction Scope
■
Section 5.4, Transaction Service in EJB Applications
■
Section 5.5, Transaction Service in RMI Applications
■
Section 5.6, Transaction Service Interoperating with OTS
5.1 About the Transaction Service
WebLogic Server provides a Transaction Service that supports transactions in EJB and RMI applications. In the WebLogic Server EJB container, the Transaction Service
provides an implementation of the transaction services described in the Enterprise JavaBeans Specification 3.0, published by Sun Microsystems, Inc., at
http:java.sun.comproductsejb2.0.html .
For EJB and RMI applications, WebLogic Server also provides the javax.transaction
and javax.transaction.xa packages, from Sun Microsystems, Inc., which implements the Java Transaction API JTA for Java
applications. For more information about JTA, see the Java Transaction API JTA Specification 1.1, published by Sun Microsystems, Inc., at
http:java.sun.comjavaeetechnologiesjtaindex.jsp . For more
information about the UserTransaction object that applications use to demarcate transaction boundaries, see weblogic.transaction.UserTransaction in the
Oracle WebLogic Server API Reference.
5.2 Capabilities and Limitations
This section includes the following sections:
■
Section 5.2.1, Lightweight Clients with Delegated Commit
■
Section 5.2.2, Client-initiated Transactions
■
Section 5.2.3, Transaction Integrity
■
Section 5.2.4, Transaction Termination