Database transaction recovery can occur either when the transaction service is first used, or at server startup.
By default, transaction recovery after a server failure happens when the transaction service is first used rather than at server startup. You can alter this behavior by specifying transaction service attributes that control when recovery happens, and whether the system waits for recovery to finish before allowing transactional work to proceed.
To configure transaction service startup, specify the following attributes in the transaction element in the server.xml file:
With the following transaction element configuration, transaction recovery occurs at server startup, and the server waits for transaction recovery to finish before allowing transactional work to proceed.
<transaction
recoverOnStartup="true"
waitForRecovery="true"
/>