[Network Deployment 9.0.5.24 or
later]

Configuring transaction recovery for managed Liberty servers

You can configure managed Liberty servers to automatically recover transactions on behalf of other servers. This capability is called Peer Recovery.

A managed Liberty server that is configured with a Recovery group and Recovery identity continually monitors its peers. Peers are the other server instances that are configured with the same Recovery group value. When a server detects that one of its peers is deleted, it recovers transactions by using the transaction logs from the deleted server to release any remaining resource locks.

Before you begin

To monitor peers, managed Liberty servers must be configured so that their transaction logs are accessible to all members of the recovery group. A server that runs peer recovery must have access to the same set of transactional resources as the server that is being recovered.

The use of a shared file system for this purpose, such as an rwx persistent volume in a Kubernetes cluster, is explicitly not supported where the file system crosses data centers. This limitation is due to the difficulty of implementing POSIX locking semantics in such a configuration. Under these circumstances, the transaction service must be configured to use a relational database for its transaction logs. For more information, see Transaction log management.

Procedure

  1. In the administrative console, click Servers > Server Types > WebSphere application servers > managedLibertyServer_name > Container Services > Transaction service.
  2. Enter the name of the Recovery group to which the server belongs. For example, my-mls-peer-group.
  3. Enter a unique Recovery identity for the server within the Recovery group. For example, ${HOSTNAME}${wlp.server.name}.
  4. Configure transaction logging for the server. Transaction logs are stored as files or stored in a shared database. Choose one method for all servers in the Recovery group.
    To store transaction logs as files, set the Transaction log directory to a directory path unique to this server or leave the setting blank to use the default location, ${server.output.dir}/tranlog.
    To use a shared database to store transaction logs, complete the following steps.
    1. Create a non-transaction data source that is dedicated to transaction log storage. All servers in the Recovery group must use the non-transaction data source. To create a non-transactional data source, see the Create a non-transactional data sourcesection in Transaction log management.
    2. Enter the data source JNDI name of the dedicated non-transactional data source. For example, my-mls-tx-log-datasource-jndi-name.
    3. Enter a unique Transaction Log Database Table Suffix for this server. For example, ${wlp.server.name}.
  5. Select Synchronize changes with Nodes and save your changes to the master configuration.
  6. Repeat the procedure for the remaining managed Liberty servers you want to include in the Recovery group.

Results

Every server in the recovery group is now enabled to automatically recover transactions on behalf of the other servers in the group.