org.objectweb.jotm
Class TransactionRecoveryImpl

java.lang.Object
  extended byorg.objectweb.jotm.TransactionRecoveryImpl
All 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.
 org.objectweb.howl.log.xa.XACommittingTx howlCommitLog(byte[][] xaCmRec)
          write the Commit record to the Howl Log
 void howlDoneLog(byte[][] xaDnRec, org.objectweb.howl.log.xa.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, Properties rmProperties, TransactionResourceManager trm)
          Register 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionRecoveryImpl

public TransactionRecoveryImpl()
                        throws org.objectweb.howl.log.LogException,
                               IOException,
                               Exception
Default constructor.

Method Detail

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

getJotmRecovery

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

getRmRegistration

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

registerResourceManager

public void registerResourceManager(String rmName,
                                    XAResource rmXares,
                                    String info,
                                    Properties rmProperties,
                                    TransactionResourceManager trm)
                             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.
rmXares - XAResource associated with the Resource Manager
info - String of information for display with admin interface
rmProperties - - Strings specifying recovery properties for resource
trm - TransactionResourceManager to return the registered XAResource
Throws:
XAException - if an error occurs

registerResourceManager

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

Specified by:
registerResourceManager in interface TransactionRecovery
Parameters:
rmName - The Resource Manager to be registered.
rmXares - XAResource associated with the Resource Manager
info - String of information for display with admin interface
tranrm - TransactionResourceManager to return the registered XAResource
Throws:
XAException - if an error occurs

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.
Throws:
XAException - if an error occurs

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.
rmXares - XAResource associated with the Resource Manager
Throws:
XAException - if an error occurs

startResourceManagerRecovery

public void startResourceManagerRecovery()
                                  throws XAException
Log (in Howl) every Resource Manager (XAResource) that has been registered.

Specified by:
startResourceManagerRecovery in interface TransactionRecovery
Throws:
XAException - Thrown if the transaction manager encounters an unexpected error condition

recoverResourceManager

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

Throws:
XAException - Thrown if the transaction manager encounters an unexpected error condition

howlCommitLog

public org.objectweb.howl.log.xa.XACommittingTx howlCommitLog(byte[][] xaCmRec)
                                                       throws org.objectweb.howl.log.LogException,
                                                              Exception
write the Commit record to the Howl Log

Throws:
org.objectweb.howl.log.LogException
Exception

howlDoneLog

public void howlDoneLog(byte[][] xaDnRec,
                        org.objectweb.howl.log.xa.XACommittingTx xaCmTx)
                 throws org.objectweb.howl.log.LogException,
                        Exception
write the Done record to the Howl Log

Throws:
org.objectweb.howl.log.LogException
Exception

forget

public void forget()
            throws org.objectweb.howl.log.LogException,
                   Exception
close Transaction Recovery Log

Specified by:
forget in interface TransactionRecovery
Throws:
org.objectweb.howl.log.LogException
Exception