bitronix.tm.recovery
Class Recoverer

java.lang.Object
  extended by bitronix.tm.recovery.Recoverer
All Implemented Interfaces:
RecovererMBean, Service, java.lang.Runnable

public class Recoverer
extends java.lang.Object
implements java.lang.Runnable, Service, RecovererMBean

Recovery process implementation. Here is Mike Spille's description of XA recovery:

Straight Line Recovery:

Exceptional conditions:

To achieve this, Recoverer must have access to all previously used resources, even if the journal contains no trace of some of them. There are two ways of achieving this: either you use the ResourceLoader to configure all your resources and everything will be working automatically or by making sure resources are created before the transaction manager starts.

Those are the three steps of the Bitronix implementation:

© Bitronix Software

Author:
lorban

Constructor Summary
Recoverer()
           
 
Method Summary
 int getCommittedCount()
          Get the amount of transactions committed during the last recovery run.
 java.lang.Exception getCompletionException()
          Get the exception reported when recovery failed.
 int getRolledbackCount()
          Get the amount of transactions rolled back during the last recovery run.
 void run()
          Run the recovery process.
 void shutdown()
          Shutdown the service and free all held resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Recoverer

public Recoverer()
Method Detail

shutdown

public void shutdown()
Description copied from interface: Service
Shutdown the service and free all held resources.

Specified by:
shutdown in interface Service

run

public void run()
Run the recovery process. This method is automatically called by the transaction manager, you should never call it manually.

Specified by:
run in interface RecovererMBean
Specified by:
run in interface java.lang.Runnable

getCompletionException

public java.lang.Exception getCompletionException()
Get the exception reported when recovery failed.

Specified by:
getCompletionException in interface RecovererMBean
Returns:
the exception that made recovery fail or null if last recovery execution was successful.

getCommittedCount

public int getCommittedCount()
Get the amount of transactions committed during the last recovery run.

Specified by:
getCommittedCount in interface RecovererMBean
Returns:
the amount of committed transactions.

getRolledbackCount

public int getRolledbackCount()
Get the amount of transactions rolled back during the last recovery run.

Specified by:
getRolledbackCount in interface RecovererMBean
Returns:
the amount of rolled back transactions.