Module jakarta.cdi

Enum Class TransactionPhase

java.lang.Object
java.lang.Enum<TransactionPhase>
jakarta.enterprise.event.TransactionPhase
All Implemented Interfaces:
Serializable, Comparable<TransactionPhase>, Constable

public enum TransactionPhase extends Enum<TransactionPhase>

Distinguishes the various kinds of transactional observer methods from regular observer methods which are notified immediately.

Transactional observer methods are observer methods which receive event notifications during the before or after completion phase of the transaction in which the event was fired. If no transaction is in progress when the event is fired, they are notified at the same time as other observers. If the transaction is in progress, but jakarta.transaction.Synchronization callback cannot be registered due to the transaction being already marked for rollback or in state where jakarta.transaction.Synchronization callbacks cannot be registered, the BEFORE_COMPLETION, AFTER_COMPLETION and AFTER_FAILURE observer methods are notified at the same time as other observers, but AFTER_SUCCESS observer methods get skipped.