Jun 7, 2012

Spring Transaction Listener

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