Skip to content

Latest commit

 

History

History

HibernateSpringBootTransactionCallback

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

How To Take Control Before/After Transaction Commits/Completes Via Callbacks

Description: This application is an example of using the TransactionSynchronizationAdapter for overriding beforeCommit(), beforeCompletion(), afterCommit() and afterCompletion() callbacks globally (application-level) and at method-level.

Key points:

  • application-level: write an AOP component (see TransactionProfiler)
  • method-level: use TransactionSynchronizationManager.registerSynchronization()

If you need a deep dive into the performance recipes exposed in this repository then I am sure that you will love my book "Spring Boot Persistence Best Practices"If you need a hand of tips and illustrations of 100+ Java persistence performance issues then "Java Persistence Performance Illustrated Guide" is for you.