Storing transaction logs in a relational database
You can choose to store your Liberty transaction logs in a relational database rather than as operating system files. This feature provides high availability (HA) support without having to use a shared file system. Storing transaction service logs in a relational database is supported for production use.
About this task
The WebSphere® Application Server transaction service writes information to a transaction log for every global transaction that involves two or more resources, or that is distributed across multiple servers. These transactions are started or stopped either by applications or by the container in which they are deployed. The transaction service maintains transaction logs to ensure the integrity of transactions. Information is written to the transaction logs in the prepare phase of a distributed transaction, so that if a server with active transactions restarts after a failure, the transaction service is able to use the logs to replay any indoubt transactions. This allows the overall system to be brought back to a consistent state.
The default configuration is to store transaction logs as operating system files. This HA transaction support requires the use of a shared file system to host the transaction logs, such as an NFSv4-mounted network-attached storage (NAS) or a storage area network (SAN).
But you can choose to store the transaction logs in a relational database management system (RDBMS). This configuration option is aimed at customers who work in an HA environment. This feature enables customers, particularly those customers with an investment in HA database technology, to use their HA database as a shared repository for the transaction logs, as an alternative to using a shared file system. You can use any database type that Liberty supports.
You can configure an application server to recover the logs of a different application server. The original owning application server must not be running when using this procedure. It is typically employed to perform any outstanding transactional recovery when the transaction service logs are available but the original owning application server cannot be started.
The principal of recovery for Liberty is the same for as for WebSphere Application Server traditional. See the following resources for more information about recovery:
- Transaction recovery in Liberty
- Restarting an application server on a different host
- Moving a transaction log from one server to another
Procedure
To configure the Liberty transaction logs to be stored in an RDBMS, complete the following steps: