org.jboss.jca.core.spi.transaction.recovery

## Interface XAResourceRecovery

-     public interface XAResourceRecovery

  During recovery of crashed XA transactions, the transaction system may use instances of this interface to obtain XAResources on which to perform recovery calls. Resource managers should register instances of this interface with the transaction recovery system via an XAResourceRecoveryRegistry.
  Author:
    Jonathan Halliday (jonathan.halliday@redhat.com)
  See Also:
    `XAResourceRecoveryRegistry`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.transaction.xa.XAResource[]` | `getXAResources()` Provides XAResource(s) to the transaction system for recovery purposes.
    `void` | `initialize()` Initialize the recovery plugin
    `void` | `setJndiName(java.lang.String jndiName)` Set the JNDI name for the resource
    `void` | `shutdown()` Shutdown the recovery plugin

- - ### Method Detail

    - #### initialize

          void initialize()
                   throws java.lang.Exception

      Initialize the recovery plugin
      Throws:
        `java.lang.Exception` - If an error occurs

    - #### shutdown

          void shutdown()
                 throws java.lang.Exception

      Shutdown the recovery plugin
      Throws:
        `java.lang.Exception` - If an error occurs

    - #### getXAResources

          javax.transaction.xa.XAResource[] getXAResources()

      Provides XAResource(s) to the transaction system for recovery purposes.
      Returns:
        An array of XAResource objects for use in transaction recovery In most cases the implementation will need to return only a single XAResource in the array. For more sophisticated cases, such as where multiple different connection types are supported, it may be necessary to return more than one. The Resource should be instantiated in such a way as to carry the necessary permissions to allow transaction recovery. For some deployments it may therefore be necessary or desirable to provide resource(s) based on e.g. database connection parameters such as username other than those used for the regular application connections to the same resource manager.

    - #### setJndiName

          void setJndiName(java.lang.String jndiName)

      Set the JNDI name for the resource
      Parameters:
        `jndiName` - The value

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)