enable these flags:
logging.level.org.springframework.orm.jpa=TRACE
logging.level.org.springframework.transaction=TRACE
and you will see this in the logs:
2020-09-20 18:40:00.788 DEBUG 4904 --- [ restartedMain] o.s.orm.jpa.JpaTransactionManager : Opened new EntityManager [SessionImpl(239595802<open>)] for JPA transaction
2020-09-20 18:40:00.794 DEBUG 4904 --- [ restartedMain] o.s.orm.jpa.JpaTransactionManager : Exposing JPA transaction as JDBC [org.springframework.orm.jpa.vendor.HibernateJpaDialect$HibernateConnectionHandle@12096038]
2020-09-20 18:40:00.805 DEBUG 4904 --- [ restartedMain] o.s.orm.jpa.JpaTransactionManager : Found thread-bound EntityManager [SessionImpl(239595802<open>)] for JPA transaction
2020-09-20 18:40:00.805 DEBUG 4904 --- [ restartedMain] o.s.orm.jpa.JpaTransactionManager : Participating in existing transaction
2020-09-20 18:40:00.834 DEBUG 4904 --- [ restartedMain] o.s.orm.jpa.JpaTransactionManager : Initiating transaction commit 2020-09-20 18:40:00.839 DEBUG 4904 --- [ restartedMain] o.s.orm.jpa.JpaTransactionManager : Committing JPA transaction on EntityManager [SessionImpl(239595802<open>)]
2020-09-20 18:40:00.856 DEBUG 4904 --- [ restartedMain] o.s.orm.jpa.JpaTransactionManager : Closing JPA EntityManager [SessionImpl(239595802<open>)] after transaction
plus a lot of TRACE information equally useful (omitted here)
Demo code is available here https://github.com/vernetto/txdemo
No comments:
Post a Comment