bitronix.tm.twopc
Class Rollbacker
java.lang.Object
bitronix.tm.twopc.AbstractPhaseEngine
bitronix.tm.twopc.Rollbacker
public class Rollbacker
- extends AbstractPhaseEngine
Phase 1 & 2 Rollback logic engine.
© Bitronix Software
- Author:
- lorban
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Rollbacker
public Rollbacker(Executor executor)
rollback
public void rollback(BitronixTransaction transaction,
java.util.List interestedResources)
throws javax.transaction.HeuristicMixedException,
javax.transaction.HeuristicCommitException,
BitronixSystemException
- Rollback the current XA transaction.
TransactionTimeoutException
won't be thrown
while changing status but rather by some extra logic that will manually throw the exception after doing as much
cleanup as possible.
- Parameters:
transaction
- the transaction to rollback.interestedResources
- resources that should be rolled back.
- Throws:
javax.transaction.HeuristicCommitException
- when all resources committed instead.
javax.transaction.HeuristicMixedException
- when some resources committed and some rolled back.
BitronixSystemException
- when an internal error occured.
createJob
protected Job createJob(XAResourceHolderState resourceHolder)
- Description copied from class:
AbstractPhaseEngine
- Create a
Job
that is going to execute the phase command on the given resource.
- Specified by:
createJob
in class AbstractPhaseEngine
- Parameters:
resourceHolder
- the resource that is going to receive a command.
- Returns:
- the
Job
that is going to execute the command.
isParticipating
protected boolean isParticipating(XAResourceHolderState xaResourceHolderState)
- Description copied from class:
AbstractPhaseEngine
- Determine if a resource is participating in the phase or not. A participating resource gets
a job created to execute the phase's command on it.
- Specified by:
isParticipating
in class AbstractPhaseEngine
- Parameters:
xaResourceHolderState
- the resource to check for its participation.
- Returns:
- true if the resource must participate in the phase.