Class TestXAResourceRecoveryHelper

java.lang.Object
org.jboss.as.test.integration.transactions.spi.TestXAResourceRecoveryHelper
All Implemented Interfaces:
com.arjuna.ats.jta.recovery.XAResourceRecoveryHelper

public class TestXAResourceRecoveryHelper extends Object implements com.arjuna.ats.jta.recovery.XAResourceRecoveryHelper

Singleton startup class which instantiate the XAResourceRecoveryHelper for TestXAResource and PersistentTestXAResource created in the testsuite/shared module for testing transactional behaviour.

The recovery helper is registered within the XARecoveryModule. That's the way which is provided by Narayana to work with the XAResources during recovery. The XAResourceRecoveryHelper then provides information on unfinished Xid of the particular XAResource that the helper is responsible for.

If the arquillian test deployment contains this class the recovery handling is able to use the test xa resources during recovery.

  • Constructor Details

    • TestXAResourceRecoveryHelper

      public TestXAResourceRecoveryHelper()
  • Method Details

    • postConstruct

      @PostConstruct public void postConstruct()
      Singleton lifecycle method. Register the recovery module with the transaction manager.
    • preDestroy

      @PreDestroy public void preDestroy()
      Singleton lifecycle method. Unregister the recovery module from the transaction manager.
    • initialise

      public boolean initialise(String param) throws Exception
      Implementing XAResourceRecoveryHelper.initialise(String). Narayana does not use this.
      Specified by:
      initialise in interface com.arjuna.ats.jta.recovery.XAResourceRecoveryHelper
      Throws:
      Exception
    • getXAResources

      public XAResource[] getXAResources() throws Exception
      Implementing XAResourceRecoveryHelper.getXAResources() Returning the test XAResources which are then used during recovery by XARecoveryModule where the XAResource.recover(int) is invoked.
      Specified by:
      getXAResources in interface com.arjuna.ats.jta.recovery.XAResourceRecoveryHelper
      Throws:
      Exception