Sun Java System Application Server Platform Edition 9 Administration Guide

Configuring Application Server to Recover Transactions

Transactions might be incomplete either because the server crashed or a resource manager crashed. It is essential to complete these stranded transactions and recover from the failures. Application Server is designed to recover from these failures and complete the transactions upon server startup.

While performing the recovery, if some of the resources are unreachable the server restart may be delayed as it tries to recover the transactions.

When the transaction spans across servers, the server that started the transaction can contact the other servers to get the outcome of the transactions. If the other servers are unreachable, the transaction uses the Heuristic Decision field to determine the outcome.


Note –

For Oracle, the database user for an XA datasource requires necessary permissions to be able to recover any transactions after Application Server has crashed and has been restarted. The Oracle permissions required on various tables for transaction recovery are:


To configure Application Server to recover transactions using the Administration Console, select Configuration>Transaction Service. The Transaction Service page displays the general transaction service settings.

To enable the recovery of incomplete transactions, check the Recover box in the On Restart field. When a resource becomes unreachable during critical points in the transaction Commit protocol, transactions may not complete and remain in transaction log file. If this check box is marked, the server attempts to recover stranded transactions upon server restart. If the involved resources remain unreachable, this may delay server restart. This checkbox is not marked by default. Note that if automatic recovery is not enabled, only 2048 XA transactions are recoverable. Also see the use of the Keypoint Interval as described below.

Modify values of other fields as necessary. In the Keypoint Interval (transactions) field, specify the number of transactions between keypoint operations in the log. Keypoint operations reduce the size of the transaction log file by removing entries for completed transactions and compressing the file. A larger value for this attribute results in a larger transaction log file, but fewer keypoint operations mean a potentially better performance. A smaller value (for example, 100) results in smaller log files, but slightly reduced performance due to the greater frequency of keypoint operations.

Detailed steps for doing this are provided in the Administration Console Online Help.