private class SimpleTransactionScope.CleanupSynchronization extends TransactionSynchronizationAdapter
STATUS_COMMITTED, STATUS_ROLLED_BACK, STATUS_UNKNOWN
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Modifier | Constructor and Description |
---|---|
private |
CleanupSynchronization() |
Modifier and Type | Method and Description |
---|---|
void |
afterCompletion(int status)
Invoked after transaction commit/rollback.
|
afterCommit, beforeCommit, beforeCompletion, flush, getOrder, resume, suspend
public void afterCompletion(int status)
TransactionSynchronization
NOTE: The transaction will have been committed or rolled back already,
but the transactional resources might still be active and accessible. As a
consequence, any data access code triggered at this point will still "participate"
in the original transaction, allowing to perform some cleanup (with no commit
following anymore!), unless it explicitly declares that it needs to run in a
separate transaction. Hence: Use PROPAGATION_REQUIRES_NEW
for any transactional operation that is called from here.
afterCompletion
in interface TransactionSynchronization
afterCompletion
in class TransactionSynchronizationAdapter
status
- completion status according to the STATUS_*
constantsTransactionSynchronization.STATUS_COMMITTED
,
TransactionSynchronization.STATUS_ROLLED_BACK
,
TransactionSynchronization.STATUS_UNKNOWN
,
TransactionSynchronization.beforeCompletion()