TransactionStage

public enum TransactionStage

Any Transaction of an Entity consists of sequence of stages. Jobs which have a JobAnnotation can specify the transaction stage in which they are to be executed. By default, any job is executed during the CHECK stage.

INIT - The transaction is being initialized (create schedule, aquire locks (one writing thread, many reading threads permitted).PRE_CHECK - Prepare entities (e.g. check if any updates are to be processed, load/generate acl, cast objects into more specialized classes.)CHECK - Do the actual consistency checking.POST_CHECK - Do more consistency checking (reserved for those jobs which need the normal checks to be done already, e.g. the Strict job).PRE_TRANSACTION - Prepare the entities for the transaction (e.g. for paging, translate the state messages into state properties). Also, in this stage, the full read and write lock is aquired.TRANSACTION - Do the actual transaction.POST_TRANSACTION - Post-process entities (Success messages, write history, transform stage properties into messages).CLEANUP - Release all locks, remove temporary files, clean-up the UndoHandlers.ROLL_BACK - In case an error occured in any of the stages, this special stage rolls-back any changes and calls the UndoHandler.undo() of the UndoHandlers.

Author:

Timm Fitschen

See also: {@linkTransaction.execute()}.

Enum Constants

CHECK

public static final TransactionStage CHECK

CLEANUP

public static final TransactionStage CLEANUP

INIT

public static final TransactionStage INIT

POST_CHECK

public static final TransactionStage POST_CHECK

POST_TRANSACTION

public static final TransactionStage POST_TRANSACTION

PRE_CHECK

public static final TransactionStage PRE_CHECK

PRE_TRANSACTION

public static final TransactionStage PRE_TRANSACTION

ROLL_BACK

public static final TransactionStage ROLL_BACK

TRANSACTION

public static final TransactionStage TRANSACTION