Transaction Recovery

XA Transactions can be recovered in the event of a failure. This section details transaction recovery in the supported transaction managers.

TIBCO BusinessWorks XA Transaction Manager

By default, the transaction manager and the recovery manager are started in the same Java VM as ActiveMatrix BusinessWorks. Therefore, the transaction recovery manager is started when ActiveMatrix BusinessWorks is started, and no additional recovery configuration is necessary.

You may wish to run the recovery manager in a separate Java VM to allow transaction recovery to occur independently of ActiveMatrix BusinessWorks. For more information about starting the recovery manager in a separate Java VM, see the TIBCO BusinessWorks XA Transaction Manager documentation. No additional configuration in ActiveMatrix BusinessWorks is necessary when running in this mode.

Note: If you are using non-TIBCO JDBC drivers (such as Oracle or IBM JDBC drivers), then edit the file <BW_HOME>/tm/1.0/bin/setupenv.bat or <BW_HOME>/tm/1.0/bin/setup_env.sh. Set the variable TIBCO_TM_JDBC_JARS to the name of the non-TIBCO JDBC driver JAR file.

Java Open Transaction Manager (JOTM)

Transaction recovery is not supported by Java Open Transaction Manager (JOTM). Refer to the JOTM documentation for more information.

Arjuna Transaction Service

By default, both the Arjuna Transaction Manager and the Arjuna Transaction Recovery Manager are started in the same Java VM as ActiveMatrix BusinessWorks. Therefore, the transaction recovery manager is started when ActiveMatrix BusinessWorks is started, and no additional configuration is necessary. In this configuration however, the transaction recovery manager is disabled if ActiveMatrix BusinessWorks is stopped or if the Java VM crashes, and transaction recovery only occurs when ActiveMatrix BusinessWorks is restarted.

Running the Arjuna Transaction Recovery Manager in a separate Java VM allows transaction recovery to occur independently, regardless of the status of ActiveMatrix BusinessWorks. For more information about starting the Arjuna Transaction Recovery Manager in a separate Java VM, see the ATS documentation.

After a failure, the ATS ObjectStore may contain the serialized ActiveMatrix BusinessWorks Java classes. When running the recovery manager in a separate Java VM, the recovery manager requires references to the ActiveMatrix BusinessWorks .jar files to de-serialize the classes. Therefore, when starting the recovery manager in a separate Java VM, verify the following:

  • The classpath for the Arjuna Transaction Recovery Manager must contain the location of the ActiveMatrix BusinessWorks .jar files. The following libraries must be included in <ARJUNATS_HOME>\bin\setup-env.bat:

       <BW_HOME>lib\palettes\plugins.jar
       <BW_HOME>lib\engine.jar
     
       <TRA_HOME>lib\TIBCOxml.jar
       <TRA_HOME>lib\TIBCOrt.jar
       <TRA_HOME>lib\TIBCrypt.jar
       <TRA_HOME>lib\TIBCOjms.jar
     
       <TPCL_HOME>jdbc\TIbase.jar
       <TPCL_HOME>jdbc\TIutil.jar
       <TPCL_HOME>jdbc\TIoracle.jar
       <TPCL_HOME>jdbc\TIsqlserver.jar
       <TPCL_HOME>jdbc\TIsybase.jar
       <TPCL_HOME>jdbc\TIdb2.jar
     
       <J2EE_LIB>\jms.jar
       <ORACLE_LIB>\ojdbc14.jar (when using an Oracle database)
  • The ATS property file for the recovery manager must refer to the same ATS ObjectStore that is configured for ActiveMatrix BusinessWorks (for a description of configuring the ATS object store, see Configuring Transaction Managers).

  • Do not allow more than one Arjuna Transaction Recovery Manager to refer to the same ATS ObjectStore. That is, do not start one recovery manager in the same Java VM as ActiveMatrix BusinessWorks, and then start another recovery manager in a different Java VM when both recovery managers are pointing to the same ATS ObjectStore.

  • Recovery may not be possible if the ATS ObjectStore is modified or destroyed. For more information, see the ATS documentation.

For more information about transaction recovery, refer to the Arjuna Transaction Service documentation.

Note: When using the Oracle database, the exception is logged by the ATS recovery manager after invoking the method "getConnection" of the XAConnectionRecovery object.

This may be caused either by a missing table or by a lack of permissions.

Check that the database user which the recovery manager's connection is using is the same as the one the business logic is using. Also, check that this user has the correct permissions on relevant data dictionary tables and views for the XA system.