Enum Class TransactionPhase
- All Implemented Interfaces:
Serializable
,Comparable<TransactionPhase>
,Constable
- Since:
- 4.2
- Author:
- Stephane Nicoll, Juergen Hoeller, Sam Brannen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionHandle the event after the commit has completed successfully.Handle the event after the transaction has completed.Handle the event if the transaction has rolled back.Handle the event before transaction commit. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionPhase
Returns the enum constant of this class with the specified name.static TransactionPhase[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BEFORE_COMMIT
Handle the event before transaction commit. -
AFTER_COMMIT
Handle the event after the commit has completed successfully.Note: This is a specialization of
AFTER_COMPLETION
and therefore executes in the same sequence of events asAFTER_COMPLETION
(and not inTransactionSynchronization.afterCommit()
).Interactions with the underlying transactional resource will not be committed in this phase. See
TransactionSynchronization.afterCompletion(int)
for details. -
AFTER_ROLLBACK
Handle the event if the transaction has rolled back.Note: This is a specialization of
AFTER_COMPLETION
and therefore executes in the same sequence of events asAFTER_COMPLETION
.Interactions with the underlying transactional resource will not be committed in this phase. See
TransactionSynchronization.afterCompletion(int)
for details. -
AFTER_COMPLETION
Handle the event after the transaction has completed.For more fine-grained events, use
AFTER_COMMIT
orAFTER_ROLLBACK
to intercept transaction commit or rollback, respectively.Interactions with the underlying transactional resource will not be committed in this phase. See
TransactionSynchronization.afterCompletion(int)
for details.
-
-
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
-