[jboss-user] [EJB 3.0 Users] - How to catch JTA/JPA exception?
gackonac
do-not-reply at jboss.com
Tue Sep 1 06:04:05 EDT 2009
Hello!
Is there a way to catch exception when transaction fail?
Simple scenario:
- MDB receives the message
- onMessage() try DB access (JPA provider is Hibernate)
- DB operation fails
onMessage() method returns without exception. Just after it's finished, exception is thrown: javax.transaction.RollbackException (caused by java.sql.*Exception).
So, I need to (explicitly) handle any exception that might be a cause of transaction failure. Is there any idea how to do that?
Thanks for your attention!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252787#4252787
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252787
More information about the jboss-user
mailing list