Package bitronix.tm.twopc
Class Rollbacker
java.lang.Object
bitronix.tm.twopc.AbstractPhaseEngine
bitronix.tm.twopc.Rollbacker
Phase 1 & 2 Rollback logic engine.
- Author:
- lorban
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JobcreateJob(XAResourceHolderState resourceHolder) Create aJobthat is going to execute the phase command on the given resource.protected booleanisParticipating(XAResourceHolderState xaResourceHolderState) Determine if a resource is participating in the phase or not.voidrollback(BitronixTransaction transaction, List<XAResourceHolderState> interestedResources) Rollback the current XA transaction.Methods inherited from class bitronix.tm.twopc.AbstractPhaseEngine
collectNotInterestedResources, collectResourcesUniqueNames, executePhase, logFailedResources
-
Constructor Details
-
Rollbacker
-
-
Method Details
-
rollback
public void rollback(BitronixTransaction transaction, List<XAResourceHolderState> interestedResources) throws jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicCommitException, BitronixSystemException Rollback the current XA transaction. Transaction will not timeout 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:
jakarta.transaction.HeuristicCommitException- when all resources committed instead.jakarta.transaction.HeuristicMixedException- when some resources committed and some rolled back.BitronixSystemException- when an internal error occured.
-
createJob
Description copied from class:AbstractPhaseEngineCreate aJobthat is going to execute the phase command on the given resource.- Specified by:
createJobin classAbstractPhaseEngine- Parameters:
resourceHolder- the resource that is going to receive a command.- Returns:
- the
Jobthat is going to execute the command.
-
isParticipating
Description copied from class:AbstractPhaseEngineDetermine 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:
isParticipatingin classAbstractPhaseEngine- Parameters:
xaResourceHolderState- the resource to check for its participation.- Returns:
- true if the resource must participate in the phase.
-