Product SiteDocumentation Site

2.3. Recovery Modules

As stated before each recovery module is used to recover a different type of transaction/resource, but each recovery module must implement the following RecoveryModule interface, which defines two methods: periodicWorkFirstPass and periodicWorkSecondPass invoked by the Recovery Manager.
Example 2.2. RecoveryModule interface
public interface RecoveryModule {
	/**
	 * Called by the RecoveryManager at start up, and then
	 * PERIODIC_RECOVERY_PERIOD seconds after the completion, for all
	 * RecoveryModules of the second pass
	 */
	public void periodicWorkFirstPass();

	/**
	 * Called by the RecoveryManager RECOVERY_BACKOFF_PERIOD seconds after the
	 * completion of the first pass
	 */
	public void periodicWorkSecondPass();
}


2.3.1. JBossTS Recovery Module Classes

JBossTS provides a set of recovery modules that are responsible to manage recovery according to the nature of the participant and its position in a transactional tree. The provided classes (that all implements the RecoveryModule interface) are:
  • com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule
    Recovers AtomicAction transactions.
  • com.arjuna.ats.internal.jts.recovery.transactions.TransactionRecoveryModule
    Recovers JTS Transactions. This is a generic class from which TopLevel and Server transaction recovery modules inherit, respectively
  • com.arjuna.ats.internal.jts.recovery.transactions.TopLevelTransactionRecoveryModule
  • com.arjuna.ats.internal.jts.recovery.transactions.ServerTransactionRecoveryModule