-
Nov 16th, 2010, 10:41 AM
#1
Spring Service Method Commits on an Checked Exception?!
I did a little experiment and was surprised to discover that when an exception occurs inside of my Spring “Service method” the transaction is still committed?! I recall reading somewhere that "by default," Spring will only rollback on an unchecked exception!? Please excuse my ignorance if this makes no sense; still learning my way around the highly complex framework
Anyway, does anyone know of a way to configure Spring so that the rollback occurs on specific (or all) checked exceptions?We are using Spring 3.0.x. Also, I am using the Hibernate Transaction Manager (org.springframework.orm.hibernate3.HibernateTrans actionManager) and my Service method is configured as a PROPAGATION_REQUIRED.
-
Nov 16th, 2010, 01:27 PM
#2
All of that is explained in the transaction chapter of the reference guide. Especially the declarative section.
-
Nov 16th, 2010, 03:05 PM
#3
Thanks, for pointing me in the right direction. Got the answer
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules