[Network Deployment 9.0.5.24 or
later]

Configuring transaction log management

You can configure the transaction service to use an existing database as a shared repository for the transaction logs. You can use any database type that IBM® Modernized Runtime Extension for Java™ supports.

By default, the transaction service stores transaction logs as operating system files. This capability 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). In some containerized environments, this configuration might be problematic due to the complexities of the implementation and the lack of support from some cloud service providers.

Before you begin

To store managed Liberty server transaction logs in a Relational Database Management System (RDBMS), configure a dedicated, non-transactional data source in the MoRE resource configuration. Then set the data source JNDI name in the server’s transaction service settings to the JNDI name of the data source that is dedicated for transaction logging.

Create a non-transactional data source

To create a non-transactional data source for transaction log storage, complete the following steps.

  1. Create a JDBC provider for your specific RDBMS implementation and specify an implementation type of non-XA.
  2. Create a JAAS J2C authentication data alias to define the security credentials that are used to connect to the RDBMS. The credentials that are defined in the RDBMS must have authority to create tables in the database.
  3. Create a data source by using the new JDBC provider. The component managed authentication alias must be set to the new JAAS J2C authentication data alias. Define the URL for your data source to specify a connection to the RDBMS and specify a JNDI name for the data source.
  4. Configure the new data source to be non-transactional by completing the following steps.
    1. Open the created data source.
    2. Under Additional Properties, click WebSphere Application Server data source properties.
    3. Select Non-transactional data source.
    4. Save your changes.

When you configure a non-transactional data source to store transaction logs, you must not change the value of the custom property syncQueryTimeoutWithTransactionTimeout from the default. The default value is false.

Enable the transaction service

Each server must have its own tables when you store transaction logs in an RDBMS. You can specify a unique table suffix for a server by using the Transaction Log Database Table Suffix. The value for the Transaction Log Database Table Suffix is a string that is appended to the table name. Appending a string to the table name makes the name unique to the server where the table is hosted. A simple and useful suffix setting is ${wlp.server.name}, a reserved Liberty variable that resolves to the name of the managed Liberty server. The server name is added as a suffix to any table names that are created for this server in an RDBMS, which allows the tables to correlate to the server.

To enable the transaction service to store transactions in a relational database, complete the following steps.

  1. In the WebSphere Application Server administrative console, click Servers > Server Types > WebSphere application servers > server_name. The properties of the specified application server are displayed.
  2. Enter the data source JNDI name of a non-transactional data source dedicated for transaction log storage.
  3. Enter a unique Transaction Log Database Table Suffix for this server.
    Avoid trouble: If you are using an Oracle database, the length of the suffix string must not exceed 15 characters.
  4. Select the Synchronize changes with Nodes and save your changes to the master configuration.

Results

The server is now enabled to store transaction logs to a relational database.