bitronix.tm.recovery
Class RecoveryHelper

java.lang.Object
  extended by bitronix.tm.recovery.RecoveryHelper

public class RecoveryHelper
extends java.lang.Object

Reovery helper methods.

© Bitronix Software

Author:
lorban

Constructor Summary
RecoveryHelper()
           
 
Method Summary
static boolean commit(XAResourceHolderState xaResourceHolderState, javax.transaction.xa.Xid xid)
          Commit the specified branch of a dangling transaction.
static java.util.Set recover(XAResourceHolderState xaResourceHolderState)
          Run the recovery process on the target resource.
static boolean rollback(XAResourceHolderState xaResourceHolderState, javax.transaction.xa.Xid xid)
          Rollback the specified branch of a dangling transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecoveryHelper

public RecoveryHelper()
Method Detail

recover

public static java.util.Set recover(XAResourceHolderState xaResourceHolderState)
                             throws javax.transaction.xa.XAException
Run the recovery process on the target resource.

Parameters:
xaResourceHolderState - the XAResourceHolderState to recover.
Returns:
a Set of BitronixXids.
Throws:
javax.transaction.xa.XAException - if XAResource.recover(int) calls fail.

commit

public static boolean commit(XAResourceHolderState xaResourceHolderState,
                             javax.transaction.xa.Xid xid)
Commit the specified branch of a dangling transaction.

Parameters:
xaResourceHolderState - the XAResourceHolderState to commit the branch on.
xid - the Xid to commit.
Returns:
true when commit was successful.

rollback

public static boolean rollback(XAResourceHolderState xaResourceHolderState,
                               javax.transaction.xa.Xid xid)
Rollback the specified branch of a dangling transaction.

Parameters:
xaResourceHolderState - the XAResourceHolderState to rollback the branch on.
xid - the Xid to rollback.
Returns:
true when rollback was successful.