Package bitronix.tm.twopc
Class Committer
java.lang.Object
bitronix.tm.twopc.AbstractPhaseEngine
bitronix.tm.twopc.Committer
Phase 2 Commit logic engine.
- Author:
- lorban
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit(BitronixTransaction transaction, List<XAResourceHolderState> interestedResources) Execute phase 2 commit.protected 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.Methods inherited from class bitronix.tm.twopc.AbstractPhaseEngine
collectNotInterestedResources, collectResourcesUniqueNames, executePhase, logFailedResources
-
Constructor Details
-
Committer
-
-
Method Details
-
commit
public void commit(BitronixTransaction transaction, List<XAResourceHolderState> interestedResources) throws jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicRollbackException, BitronixSystemException, BitronixRollbackException Execute phase 2 commit.- Parameters:
transaction- the transaction wanting to commit phase 2interestedResources- a map of phase 1 prepared resources wanting to participate in phase 2 using Xids as keys- Throws:
jakarta.transaction.HeuristicRollbackException- when all resources committed instead.jakarta.transaction.HeuristicMixedException- when some resources committed and some rolled back.BitronixSystemException- when an internal error occured.BitronixRollbackException- during 1PC when resource fails to commit
-
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.
-