Class JDBCXARecovery
java.lang.Object
com.arjuna.ats.internal.jdbc.recovery.JDBCXARecovery
- All Implemented Interfaces:
XAResourceRecovery
This provides recovery for compliant JDBC drivers. It is not meant to be
implementation specific.
Users are responsible for deploying an appropriate XADataSource into JNDI and
then providing the relevant JNDI lookup information in a property file to an
instance of this class. Username and password values may also be provided in
the same property file.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet a resource to use for recovery purposes.boolean
Iterate through all of the resources this instance provides access to.boolean
initialise
(String parameter) The recovery module will have chopped off this class name already.
-
Field Details
-
DATABASE_JNDI_NAME
- See Also:
-
USER_NAME
- See Also:
-
PASSWORD
- See Also:
-
-
Constructor Details
-
JDBCXARecovery
- Throws:
SQLException
-
-
Method Details
-
initialise
The recovery module will have chopped off this class name already. The parameter should specify a property file from which the jndi name, user name, password can be read.- Specified by:
initialise
in interfaceXAResourceRecovery
- Parameters:
parameter
- An arbitrary string from which initialization data is obtained.- Returns:
true
if initialization happened successfully,false
otherwise.- Throws:
SQLException
-
getXAResource
Description copied from interface:XAResourceRecovery
Get a resource to use for recovery purposes.- Specified by:
getXAResource
in interfaceXAResourceRecovery
- Returns:
- a new XAResource.
- Throws:
SQLException
-
hasMoreResources
public boolean hasMoreResources()Description copied from interface:XAResourceRecovery
Iterate through all of the resources this instance provides access to.- Specified by:
hasMoreResources
in interfaceXAResourceRecovery
- Returns:
true
if this instance can provide more resources,false
otherwise.
-