Spring JDBC Template with business level transaction management

141 views Asked by At

I want to handle and rollback exceptions inside business service level, but when i use datasourcetransacitonmanager inside jdbctemplete it is just handle, database exceptions, do you have any suggestions? multiple management or ? merge the transaction managers?

1

There are 1 answers

1
RHammonds On

Check out @Transactional annotation on the service method. That should make anything within the service transactional to where if one fails it all rolls back.

http://docs.spring.io/spring-framework/docs/2.5.x/api/org/springframework/transaction/annotation/Transactional.html