- All Implemented Interfaces:
Serializable
,Comparable<Tx.Type>
,Constable
- Enclosing class:
Tx
Transaction type.
An enum
describing the possible ways in which transactional support must be applied to transactional method executions.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that a transaction must already be in effect when a method executes.Indicates that no transaction must be in effect when a method executes.Indicates that a new transaction will be started when a method executes.Indicates that transaction will be in effect when a method executes.Indicates that transaction may optionally be in effect when a method executes.Indicates that no transaction will be in effect when a method executes. -
Method Summary
-
Enum Constant Details
-
MANDATORY
Indicates that a transaction must already be in effect when a method executes. If called outside a transaction context, theTxException
must be thrown. If called inside a transaction context, method execution will then continue under that context. -
NEW
Indicates that a new transaction will be started when a method executes. If called outside a transaction context, the interceptor must begin a new transaction. The managed bean method execution must then continue inside this transaction context, and the transaction must be completed by the interceptor. If called inside a transaction context, the current transaction context must be suspended. New transaction will begin, the managed method execution must then continue inside this transaction context. The transaction must be completed, and the previously suspended transaction must be resumed. -
NEVER
Indicates that no transaction must be in effect when a method executes. If called outside a transaction context, method execution must then continue outside a transaction context. If called inside a transaction context, theTxException
must be thrown. -
REQUIRED
Indicates that transaction will be in effect when a method executes. If called outside a transaction context, the interceptor must begin a new transaction. The managed bean method execution must then continue inside this transaction context, and the transaction must be completed by the interceptor. If called inside a transaction context, the method execution must then continue inside this transaction context. -
SUPPORTED
Indicates that transaction may optionally be in effect when a method executes. If called outside a transaction context, method execution must then continue outside a transaction context. If called inside a transaction context, the method execution must then continue inside this transaction context. -
UNSUPPORTED
Indicates that no transaction will be in effect when a method executes. If called outside a transaction context, method execution must then continue outside a transaction context. If called inside a transaction context, the current transaction context must be suspended. The method execution must then continue outside a transaction context, and the previously suspended transaction must be resumed by the interceptor that suspended it after the method execution has completed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-