Setting up multiple journal instances to use a single set of journal
tables
There are several scenarios in which multiple journal instances access
the same set of journal tables. The following content describes each scenario
and how you set the service up to handle the scenario.
If there are multiple journal instances that use the same set of journal
tables, do the following:
Use the resetSingleTableLastRecordNumber method in the schema generator
to reinitialize the record ID whenever the server restarts.
Set the singleTable attribute of each service definition to true.
If there are multiple journal instances obtained from the pool of services,
use the resetSingleTableLastRecordNumber method in the schema generator to
reinitialize the record ID whenever the server restarts. In this scenario,
the recommended application flow is:
Request the journal instance from the services factory.
Check whether the journal is active. Open it if it is not.
Perform the requested operation in the database.
Release the journal instance.
Note that WebSphere(R) Application Server handles the connection
to the database using the dataSourceName attribute in the service definition.
If there are multiple journal services in multiple JVMs (due to using
clones for load balancing) that use the same set of journal tables, do the
following:
Set the recIdFromTable attribute in the JDBCJournalSchemaGenerator and
then regenerate the tables by calling the generateSchema method.
In the database, use the LOCK TIMEOUT command to set how long the service
object waits to obtain a lock.
Set the recIdFromTable attribute to true in the service definition.