Posts Tagged ‘JPA’

Spring @Transactional: Verifying transaction support / Local method calls

January 23rd, 2011 2 comments

A few days ago, I was debugging a persistence issue in a recently started project that uses Spring ORM + JPA 2.0/Hibernate for persistence. Using Spring’s declarative transaction support, enabling transaction management for your services is just a matter of annotating the service methods with @Transactional, assuming you have properly set up a transaction manager and tell Spring to process your @Transactional bean annotations:

<tx:annotation-driven proxy-target-class="true"/>

Since I couldn’t explain why my code wasn’t working, I began wondering if the transaction support for my service method was configured correctly. Read more…