bitronix.tm.recovery
Class Recoverer

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

public class Recoverer
extends Object
implements 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 re-created and re-registered.

Those are the three steps of the Bitronix implementation:

Author:
lorban

Constructor Summary
Recoverer()
           
 
Method Summary
 int getCommittedCount()
          Get the amount of transactions committed during the last recovery run.
 Exception getCompletionException()
          Get the exception reported when recovery failed.
 int getExecutionsCount()
          Get how many times the recoverer has run since the transaction manager started.
 int getRolledbackCount()
          Get the amount of transactions rolled back during the last recovery run.
 boolean isRunning()
          Check if the recoverer currently is running.
 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 Runnable

getCompletionException

public 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.

getExecutionsCount

public int getExecutionsCount()
Get how many times the recoverer has run since the transaction manager started.

Specified by:
getExecutionsCount in interface RecovererMBean
Returns:
how many times the recoverer has run since the transaction manager started.

isRunning

public boolean isRunning()
Check if the recoverer currently is running.

Specified by:
isRunning in interface RecovererMBean
Returns:
true if the recoverer currently is running, false otherwise.


Copyright © 2006-2013 Bitronix Software. All Rights Reserved.