|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.recovery.Recoverer
public class Recoverer
Recovery process implementation. Here is Mike Spille's description of XA recovery:
Straight Line Recovery:
XAResource
s which were being used when chunk blowing occured.recover()
method on each of these XAResource
s.Xid
's in the XAResource
' recover lists which are not owned by this TM.Xid
's that the TM knows about with remaining Xid
's that the XAResource
s
reported.XAResource
Xid
's that match the global transaction ID which the TM found dangling with
a "Committing..." record, call commit()
on those XAResource
s for those Xid
s.XAResource
Xid
's that do not match any dangling "Committing..." records, call
rollback()
on those XAResource
s for those Xid
s.rollback()
calls from step 6 which reported a Heuristic Commit, you are in danger or
doubt, so run in circles, scream and shout.commit()
calls from step 7 which reported a Heuristic Rollback, you are in danger or
doubt, so run in circles, scream and shout.forget()
for that
XAResource
/Xid
pair so that the resource can stop holding onto a reference to that transactionTo 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:
recover()
on all known resources (Mike's steps 1 to 5)
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 |
---|
public Recoverer()
Method Detail |
---|
public void shutdown()
Service
shutdown
in interface Service
public void run()
run
in interface RecovererMBean
run
in interface Runnable
public Exception getCompletionException()
getCompletionException
in interface RecovererMBean
public int getCommittedCount()
getCommittedCount
in interface RecovererMBean
public int getRolledbackCount()
getRolledbackCount
in interface RecovererMBean
public int getExecutionsCount()
getExecutionsCount
in interface RecovererMBean
public boolean isRunning()
isRunning
in interface RecovererMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |