The transaction management system may require assistance from resource
managers in order to recover crashed XA transactions. By registering
an XAResourceRecovery instance with the XAResourceRecoveryRegistry,
resource manager connectors provide a way for the recovery system to
callback to them and obtain the necessary information.
This is useful for e.g. JDBC connection pools or JCA connectors that
don't want to expose connection parameters to the transaction system.
The connectors are responsible for instantiating a connection and
using it to instantiate a set of XAResources. These are then exposed to
the recovery system via the registered XAResourceRecovery instance.
Register an XAResourceRecovery instance with the transaction recovery system.
This should be called by deployers that are deploying a new XA aware
module that needs recovery support. For example, a database
connection pool, JMS adapter or JCA connector.
Parameters:
recovery - The XAResourceRecovery instance to register.
Unregister an XAResourceRecovery instance from the transaction recovery system.
This should be called when an XA aware module is undeployed, to inform the
recovery system that recovery is no longer required or supported.
Note this method may block whilst an ongoing recovery operation is completed.
Recovery behavior is undefined if the undeployment does not wait for this
operation to complete.
Parameters:
recovery - The XAResourceRecovery instance to unregister.
Implementations should fail silent if an attempt is made to unregister
an XAResourceRecovery instance that is not currently registered.