Class RecoveryExecutor

java.lang.Object
org.jboss.as.test.integration.transactions.RecoveryExecutor

public class RecoveryExecutor extends Object
A helper class which wraps remote execution of the transaction recovery.
  • Constructor Details

    • RecoveryExecutor

      public RecoveryExecutor(org.jboss.as.arquillian.container.ManagementClient managementClient)
  • Method Details

    • runTransactionRecovery

      public boolean runTransactionRecovery()
      Run transaction recovery with default read socket timeout. See more at runTransactionRecovery(int).
      Returns:
      true if recovery was successfully run without any issue, false otherwise
    • runTransactionRecovery

      public boolean runTransactionRecovery(int socketReadTimeout)

      Run the transaction recovery. It expects the transaction-listener is enabled (/subsystem=transactions/:write-attribute(name=transaction-listener, value=true)).

      Returning from this method could not necessary means that whole recovery cycle was fully finished. To be sure that the whole recovery cycle is finished is recommended to run this method twice (one by one). After the second call it's ensured that one(!) recovery cycle is fully finished.

      The method returns true if the recovery socket listener call succeeded and when the recovery cycle was run without any issue. An issue means there is an error on recovery processing of an XAResource - e.g. one example of such failure could be a database is down and recovery was not able to connect.

      Parameters:
      socketReadTimeout - socket timeout for launching the recovery against the transaction listener socket, expected to be opened already
      Returns:
      true if recovery was successfully run without any issue, false otherwise
    • cliRecoverAllTransactions

      public void cliRecoverAllTransactions()
      Running WildFly CLI operations to run ':recover' operations on all in-doubt transactions.