![]() |
![]() |
|
Managing Transactions
The following topics are discussed:
This section provides guidelines for configuring and managing transactions through the Administration Console. For information on configuring JDBC connection pools to allow JDBC drivers to participate in distributed transactions, see " Managing JDBC Connectivity" in the Administration Guide.
Overview of Transaction Management
The Administration Console provides an interface to the tools that allow you to enable and configure WebLogic Server features, including the JavaTransaction API (JTA). To invoke the Administration Console, see the procedures provided in Configuring WebLogic Servers and Clusters. The configuration process involves specifying values for attributes. These attributes define various aspects of the transaction environment, including the following:
Before configuring your transaction environment, you should be familiar with the J2EE components that can participate in transactions, such as EJBs, JDBC, and JMS.
For more information about configuring J2EE components, see the applicable sections of this document and the Administration Console online help.
The Administration Console provides default values for all JTA configuration attributes. If you specify an invalid value for any configuration attribute, the WebLogic Server does not boot when you restart it.
Configuration settings for JTA are applicable at the domain level. This means that configuration attribute settings apply to all servers within a domain. Monitoring and logging tasks for JTA are performed at the server level.
Once you have configured WebLogic JTA and any transaction participants, the system can perform transactions using the JTA API and the WebLogic JTA extensions.
You can configure any transaction attributes before running applications (static configuration) or, with one exception, at application run time (dynamic configuration). The TransactionLogFilePrefix attribute must be set before running applications.
To configure transaction attributes, complete the following procedure:
Table 13-1 briefly describes the transaction attributes available with WebLogic Server. For detailed information about attributes, and valid and default values for them, see the Domain topic in the Administration Console online help.
Attribute |
Description |
---|---|
Timeout Seconds |
The time, in seconds, a transaction may be active before the system forces a rollback. |
Abandon Timeout Seconds |
The maximum time, in seconds, that a transaction coordinator persists in attempting to complete a transaction. |
Before Completion Iteration Limit |
The number of beforeCompletion callbacks that are processed before the system forces a rollback. |
Max Transactions |
The maximum number of transactions that may be active on a particular server at one time. |
Max Unique Name Statistics |
The maximum number of unique transaction names that may be tracked by a server at one time. |
Forget Heuristics |
A Boolean value specifying whether the transaction manager should instruct a resource to forget any transaction with a heuristic outcome. |
Monitoring and Logging Transactions
The Administration Console allows you to monitor transactions and to specify the transaction log file prefix. Monitoring and logging tasks are performed at the server level. Transaction statistics are displayed for a specific server and each server has a transaction log file.
To display transaction statistics and to set the prefix for the transaction log files, complete the following procedure:
For detailed information on monitoring and logging values and attributes, see the Server topic in the Administration Console online help.
Moving a Server to Another Machine
When an applications server is moved to another machine, it must be able to locate the transaction log files on the new disk. For this reason, we recommend moving the transaction log files to the new machine before starting the server there. By doing so you can ensure that recovery runs properly. If the pathname is different on the new machine, update the TransactionLogFilePrefix attribute with the new path before starting the server.
When migrating transaction logs after a server failure, make all transaction log files available on the new machine before starting the server there. You can accomplish this by storing transaction log files on a dual-ported disk available to both machines. As in the case of a planned migration, update the TransactionLogFilePrefix attribute with the new path before starting the server if the pathname is different on the new machine. It is important to ensure that all transaction log files are available on the new machine before the server is started there. Otherwise, transactions in the process of being committed at the time of a crash might not be resolved correctly, resulting in application data inconsistencies.
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|