Very easy way doing that is by registering the listener with the transaction.
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
@Override
public void afterCommit() {
// here you will do something
}
}
);
This is Spring based.
Have a good day,
Dor
No comments:
Post a Comment