Top Description Fields Constructors Methods
javax.enterprise.event

public final Enum TransactionPhase

extends Enum<TransactionPhase>
Class Inheritance

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 javax.transaction.Synchronization callback cannot be registered due to the transaction being already marked for rollback or in state where javax.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.

Authors
Pete Muir, Gavin King

Field Summary

Modifier and TypeField and Description
public static final TransactionPhase
AFTER_COMPLETION

Identifies an after completion observer method, called during the after completion phase of the transaction.

public static final TransactionPhase
AFTER_FAILURE

Identifies an after failure observer method, called during the after completion phase of the transaction, only when the transaction fails.

public static final TransactionPhase
AFTER_SUCCESS

Identifies an after success observer method, called during the after completion phase of the transaction, only when the transaction completes successfully.

public static final TransactionPhase
BEFORE_COMPLETION

Identifies a before completion observer method, called during the before completion phase of the transaction.

public static final TransactionPhase
IN_PROGRESS

Identifies a regular observer method, called when the event is fired.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TransactionPhase
public static TransactionPhase[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AFTER_COMPLETIONback to summary
public static final TransactionPhase AFTER_COMPLETION

Identifies an after completion observer method, called during the after completion phase of the transaction.

Transactional observer will be notified if there is no transaction in progress, or the transaction is in progress, but javax.transaction.Synchronization callback cannot be registered due to the transaction being already marked for rollback or in state where javax.transaction.Synchronization callbacks cannot be registered.

AFTER_FAILUREback to summary
public static final TransactionPhase AFTER_FAILURE

Identifies an after failure observer method, called during the after completion phase of the transaction, only when the transaction fails.

Transactional observer will be notified will also get invoked if there is no transaction in progress, or the transaction is in progress, but javax.transaction.Synchronization callback cannot be registered due to the transaction being already marked for rollback or in state where javax.transaction.Synchronization callbacks cannot be registered.

AFTER_SUCCESSback to summary
public static final TransactionPhase AFTER_SUCCESS

Identifies an after success observer method, called during the after completion phase of the transaction, only when the transaction completes successfully.

BEFORE_COMPLETIONback to summary
public static final TransactionPhase BEFORE_COMPLETION

Identifies a before completion observer method, called during the before completion phase of the transaction.

Transactional observer will be notified if there is no transaction in progress, or the transaction is in progress, but javax.transaction.Synchronization callback cannot be registered due to the transaction being already marked for rollback or in state where javax.transaction.Synchronization callbacks cannot be registered.

IN_PROGRESSback to summary
public static final TransactionPhase IN_PROGRESS

Identifies a regular observer method, called when the event is fired.

Constructor Detail

TransactionPhaseback to summary
private TransactionPhase()

Method Detail

valueOfback to summary
public static TransactionPhase valueOf(String name)
valuesback to summary
public static TransactionPhase[] values()