Preparer (Bitronix Transaction Manager :: Core 2.1.4 API)
Date: 2013-09-15

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## bitronix.tm.twopc
Class Preparer

    java.lang.Object
      bitronix.tm.twopc.AbstractPhaseEngine
          bitronix.tm.twopc.Preparer

    public final class Preparer

extends AbstractPhaseEngine

Phase 1 Prepare logic engine.

Author:
  lorban

Constructor Summary
`Preparer(Executor executor)`

Method Summary
`protected Job` | `createJob(XAResourceHolderState xaResourceHolderState)` Create a `Job` that is going to execute the phase command on the given resource.
`protected boolean` | `isParticipating(XAResourceHolderState xaResourceHolderState)` Determine if a resource is participating in the phase or not.
`List<XAResourceHolderState>` | `prepare(BitronixTransaction transaction)` Execute phase 1 prepare.

Methods inherited from class bitronix.tm.twopc.AbstractPhaseEngine
`collectNotInterestedResources, collectResourcesUniqueNames, executePhase, logFailedResources`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Preparer

    public Preparer(Executor executor)

Method Detail

### prepare

    public List<XAResourceHolderState> prepare(BitronixTransaction transaction)
                                        throws 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:
    `RollbackException` - when an error occured that can be fixed with a rollback.
    `BitronixSystemException` - when an internal error occured.

### createJob

    protected Job createJob(XAResourceHolderState xaResourceHolderState)

  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:
    `xaResourceHolderState` - 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Bitronix Software. All Rights Reserved.