public enum Propagation extends java.lang.Enum<Propagation>
Transactional
annotation to specify whether the methods of
a CDI managed bean are called with a valid transaction context and propataion of the transaction context.Enum Constant and Description |
---|
MANDATORY
If a client invokes the bean's method while the client is associated with a transaction context, the container
invokes the bean's method in the client's transaction context, otherwise an exception is thrown.
|
NEVER
The client is required to call without a transaction context, otherwise an exception is thrown.
|
REQUIRED
If a client invokes the bean's method while the client is associated with a transaction context, the container
invokes the bean's method in the client's transaction context, otherwise the container invokes the bean's method in
it's own transaction context.
|
SUPPORTS
If the client calls with a transaction context, the container performs the same steps as described in the REQUIRED
case.
|
Modifier and Type | Method and Description |
---|---|
static Propagation |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Propagation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Propagation REQUIRED
public static final Propagation SUPPORTS
public static final Propagation MANDATORY
public static final Propagation NEVER
public static Propagation[] values()
for (Propagation c : Propagation.values()) System.out.println(c);
public static Propagation valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null