Package bitronix.tm.twopc
Class Preparer
java.lang.Object
bitronix.tm.twopc.AbstractPhaseEngine
bitronix.tm.twopc.Preparer
Phase 1 Prepare logic engine.
- Author:
- lorban
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JobcreateJob(XAResourceHolderState xaResourceHolderState) 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.prepare(BitronixTransaction transaction) Execute phase 1 prepare.Methods inherited from class bitronix.tm.twopc.AbstractPhaseEngine
collectNotInterestedResources, collectResourcesUniqueNames, executePhase, logFailedResources
-
Constructor Details
-
Preparer
-
-
Method Details
-
prepare
public List<XAResourceHolderState> prepare(BitronixTransaction transaction) throws jakarta.transaction.RollbackException, BitronixSystemException Execute phase 1 prepare.- Parameters:
transaction- the transaction to prepare.- Returns:
- a list that will be filled with all resources that received the prepare command
and replied with
XAResource.XA_OK. - Throws:
jakarta.transaction.RollbackException- when an error occured that can be fixed with a rollback.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:
xaResourceHolderState- 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.
-