org.objectweb.jotm

Class TransactionRecoveryImpl

Implemented Interfaces:
TransactionRecovery

public class TransactionRecoveryImpl
extends Object
implements TransactionRecovery

Author:
Tony Ortiz

Constructor Summary

TransactionRecoveryImpl()
Default constructor.

Method Summary

void
forget()
close Transaction Recovery Log
JotmRecovery
getJotmRecovery()
Vector
getRmRegistration()
static TransactionRecoveryImpl
getTransactionRecovery()
Returns the unique instance of the class or null if not initialized in case of plain client.
XACommittingTx
howlCommitLog(byte[][] xaCmRec)
write the Commit record to the Howl Log
void
howlDoneLog(byte[][] xaDnRec, XACommittingTx xaCmTx)
write the Done record to the Howl Log
void
recoverResourceManager()
Recover a Resource Manager with the JOTM Transaction Manager.
void
registerResourceManager(String rmName, XAResource rmXares, String info, TransactionResourceManager tranrm)
Register a Resource Manager with the JOTM Transaction Manager.
XAResource
reportResourceManager(String rmName)
Provide information regarding the status and state of the XAResource.
void
startResourceManagerRecovery()
Log (in Howl) every Resource Manager (XAResource) that has been registered.
void
unregisterResourceManager(String rmName, XAResource rmXares)
Unregister a Resource Manager from the JOTM Transaction Manager.

Constructor Details

TransactionRecoveryImpl

public TransactionRecoveryImpl()
            throws LogException,
                   IOException,
                   Exception
Default constructor.

Method Details

forget

public void forget()
            throws LogException,
                   Exception
close Transaction Recovery Log
Specified by:
forget in interface TransactionRecovery


getJotmRecovery

public JotmRecovery getJotmRecovery()
Specified by:
getJotmRecovery in interface TransactionRecovery


getRmRegistration

public Vector getRmRegistration()
Specified by:
getRmRegistration in interface TransactionRecovery


getTransactionRecovery

public static TransactionRecoveryImpl getTransactionRecovery()
Returns the unique instance of the class or null if not initialized in case of plain client.

Returns:
The TransactionRecovery object created


howlCommitLog

public XACommittingTx howlCommitLog(byte[][] xaCmRec)
            throws LogException,
                   Exception
write the Commit record to the Howl Log


howlDoneLog

public void howlDoneLog(byte[][] xaDnRec,
                        XACommittingTx xaCmTx)
            throws LogException,
                   Exception
write the Done record to the Howl Log


recoverResourceManager

public void recoverResourceManager()
            throws XAException
Recover a Resource Manager with the JOTM Transaction Manager.


registerResourceManager

public void registerResourceManager(String rmName,
                                    XAResource rmXares,
                                    String info,
                                    TransactionResourceManager tranrm)
            throws XAException
Register a Resource Manager with the JOTM Transaction Manager.
Specified by:
registerResourceManager in interface TransactionRecovery

Parameters:
rmName - The Resource Manager to be registered.


reportResourceManager

public XAResource reportResourceManager(String rmName)
            throws XAException
Provide information regarding the status and state of the XAResource.
Specified by:
reportResourceManager in interface TransactionRecovery

Parameters:
rmName - The Resource Manager to be reported upon.

Returns:
XAResource The XAResource assigned to the Resource Managere.


startResourceManagerRecovery

public void startResourceManagerRecovery()
            throws XAException
Log (in Howl) every Resource Manager (XAResource) that has been registered.
Specified by:
startResourceManagerRecovery in interface TransactionRecovery


unregisterResourceManager

public void unregisterResourceManager(String rmName,
                                      XAResource rmXares)
            throws XAException
Unregister a Resource Manager from the JOTM Transaction Manager.
Specified by:
unregisterResourceManager in interface TransactionRecovery

Parameters:
rmName - The Resource Manager to be unregistered.