org.jboss.jca.core.tx.jbossts

## Class XAResourceRecoveryImpl

- java.lang.Object
- - org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl

- All Implemented Interfaces:
    org.jboss.tm.XAResourceRecovery

      public class XAResourceRecoveryImpl
      extends java.lang.Object
      implements org.jboss.jca.core.spi.transaction.recovery.XAResourceRecovery, org.jboss.tm.XAResourceRecovery

  An XAResourceRecovery implementation.
  Author:
    Stefano Maestri, Jesper Pedersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XAResourceRecoveryImpl(org.jboss.jca.core.spi.transaction.TransactionIntegration ti, javax.resource.spi.ManagedConnectionFactory mcf, java.lang.Boolean padXid, java.lang.Boolean isSameRMOverrideValue, java.lang.Boolean wrapXAResource, java.lang.String recoverUserName, java.lang.String recoverPassword, java.lang.String recoverSecurityDomain, org.jboss.jca.core.spi.security.SubjectFactory subjectFactory, org.jboss.jca.core.spi.recovery.RecoveryPlugin plugin, org.jboss.jca.core.spi.transaction.XAResourceStatistics xastat)` Create a new XAResourceRecoveryImpl.

  - ### Method Summary

    All Methods Instance Methods Concrete 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 jndiName.
    `void` | `shutdown()` Shutdown the recovery plugin

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XAResourceRecoveryImpl

          public XAResourceRecoveryImpl(org.jboss.jca.core.spi.transaction.TransactionIntegration ti,
                                        javax.resource.spi.ManagedConnectionFactory mcf,
                                        java.lang.Boolean padXid,
                                        java.lang.Boolean isSameRMOverrideValue,
                                        java.lang.Boolean wrapXAResource,
                                        java.lang.String recoverUserName,
                                        java.lang.String recoverPassword,
                                        java.lang.String recoverSecurityDomain,
                                        org.jboss.jca.core.spi.security.SubjectFactory subjectFactory,
                                        org.jboss.jca.core.spi.recovery.RecoveryPlugin plugin,
                                        org.jboss.jca.core.spi.transaction.XAResourceStatistics xastat)

      Create a new XAResourceRecoveryImpl.
      Parameters:
        `ti` - ti
        `mcf` - mcf
        `padXid` - padXid
        `isSameRMOverrideValue` - isSameRMOverrideValue
        `wrapXAResource` - wrapXAResource
        `recoverUserName` - recoverUserName
        `recoverPassword` - recoverPassword
        `recoverSecurityDomain` - recoverSecurityDomain
        `subjectFactory` - subjectFactory
        `plugin` - recovery plugin
        `xastat` - The XAResource statistics implementation

  - ### Method Detail

    - #### initialize

          public void initialize()
                          throws java.lang.Exception

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

    - #### shutdown

          public void shutdown()
                        throws java.lang.Exception

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

    - #### setJndiName

          public void setJndiName(java.lang.String jndiName)

      Set the jndiName.
      Parameters:
        `jndiName` - The jndiName to set.

    - #### getXAResources

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

      Provides XAResource(s) to the transaction system for recovery purposes.
      Specified by:
        `getXAResources` in interface `org.jboss.tm.XAResourceRecovery`
      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.

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