[jboss-user] [EJB 3.0 Users] - Re: how to handle hibernate exceptions in ejb3
Wolfgang Knauf
do-not-reply at jboss.com
Tue Nov 10 07:08:08 EST 2009
Hi,
what about something like this:
| catch(Exception e)
| {
| if (e.getCause() instanceof ConstraintViolationException)
| {
| ...
| }
| else if (e.getCause() instanceof LockAcquisitionException)
| {
| ...
| }
|
| //Maybe also check e.getCause().getCause() and so on!
| }
Hope this helps
Wolfgang
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264795#4264795
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264795
More information about the jboss-user
mailing list