- All Implemented Interfaces:
Serializable,Comparable<TransactionPropagation>,Constable
Defines how a transaction block relates to a transaction that is already active when the block starts.
The semantics mirror the standard transaction propagation behaviors. The default is REQUIRED.
- Since:
- 1.13
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionJoins the active transaction; fails when none is active.Runs within a nested transaction (a savepoint) when a transaction is active; otherwise starts a new one.Runs without a transaction; fails when one is active.Runs without a transaction, suspending the active one for the duration of the block.Joins the active transaction, or starts a new one when none is active.Always starts a new, independent transaction, suspending the active one for the duration of the block.Joins the active transaction when one is active; otherwise runs without a transaction. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionPropagationReturns the enum constant of this class with the specified name.static TransactionPropagation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REQUIRED
Joins the active transaction, or starts a new one when none is active. The default. -
SUPPORTS
Joins the active transaction when one is active; otherwise runs without a transaction. -
MANDATORY
Joins the active transaction; fails when none is active. -
REQUIRES_NEW
Always starts a new, independent transaction, suspending the active one for the duration of the block. -
NOT_SUPPORTED
Runs without a transaction, suspending the active one for the duration of the block. -
NEVER
Runs without a transaction; fails when one is active. -
NESTED
Runs within a nested transaction (a savepoint) when a transaction is active; otherwise starts a new one.
-
-
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
-