javax.enterprise.event

Enum TransactionPhase

  • All Implemented Interfaces:
    Serializable, Comparable<TransactionPhase>

    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.

    Author:
    Pete Muir, Gavin King
    • Enum Constant Detail

      • IN_PROGRESS

        public static final TransactionPhase IN_PROGRESS

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

      • BEFORE_COMPLETION

        public static final TransactionPhase BEFORE_COMPLETION

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

      • AFTER_COMPLETION

        public static final TransactionPhase AFTER_COMPLETION

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

      • AFTER_FAILURE

        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.

      • AFTER_SUCCESS

        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.

    • Method Detail

      • values

        public static TransactionPhase[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TransactionPhase c : TransactionPhase.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TransactionPhase valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/enterprise/event/transactionphase.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.