Top Description Fields Constructors Methods
org.springframework.transaction.event

public final Enum TransactionPhase

extends Enum<TransactionPhase>
Class Inheritance
Imports
java.util.function.Consumer, org.springframework.transaction.support.TransactionSynchronization

The phase in which a transactional event listener applies.
Authors
Stephane Nicoll, Juergen Hoeller, Sam Brannen
Since
4.2
See Also
TransactionalEventListener#phase(), TransactionalApplicationListener#getTransactionPhase(), TransactionalApplicationListener#forPayload(TransactionPhase, Consumer)

Field Summary

Modifier and TypeField and Description
public static final TransactionPhase
AFTER_COMMIT

Handle the event after the commit has completed successfully.

public static final TransactionPhase
AFTER_COMPLETION

Handle the event after the transaction has completed.

public static final TransactionPhase
AFTER_ROLLBACK

Handle the event if the transaction has rolled back.

public static final TransactionPhase
BEFORE_COMMIT

Handle the event before transaction commit.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TransactionPhase
public static TransactionPhase[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AFTER_COMMITback to summary
public static final TransactionPhase 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 as AFTER_COMPLETION (and not in TransactionSynchronization#afterCommit()).

Interactions with the underlying transactional resource will not be committed in this phase. See TransactionSynchronization#afterCompletion(int) for details.

See Also
TransactionSynchronization#afterCompletion(int), TransactionSynchronization#STATUS_COMMITTED
AFTER_COMPLETIONback to summary
public static final TransactionPhase AFTER_COMPLETION

Handle the event after the transaction has completed.

For more fine-grained events, use AFTER_COMMIT or AFTER_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.

See Also
TransactionSynchronization#afterCompletion(int)
AFTER_ROLLBACKback to summary
public static final TransactionPhase 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 as AFTER_COMPLETION.

Interactions with the underlying transactional resource will not be committed in this phase. See TransactionSynchronization#afterCompletion(int) for details.

See Also
TransactionSynchronization#afterCompletion(int), TransactionSynchronization#STATUS_ROLLED_BACK
BEFORE_COMMITback to summary
public static final TransactionPhase BEFORE_COMMIT

Handle the event before transaction commit.

See Also
TransactionSynchronization#beforeCommit(boolean)

Constructor Detail

TransactionPhaseback to summary
private TransactionPhase()

Method Detail

valueOfback to summary
public static TransactionPhase valueOf(String name)
valuesback to summary
public static TransactionPhase[] values()