-
1. Re: inconsistent exception handling in hibernate validation
amitka Dec 15, 2006 11:10 AM (in response to amitka)I forgot to mention that JBoss doesn't wrap the InvalidStateException in EJBException because I marked this exception as an application exception, and as one that requires rollback in ejb-jar.xml the following way:
<application-exception> <exception-class>org.hibernate.validator.InvalidStateException</exception-class> <rollback>true</rollback> </application-exception>
-
2. Re: inconsistent exception handling in hibernate validation
amitka Dec 23, 2006 5:45 PM (in response to amitka)I just saw that when it is not an entity creation but rather it is an update on an existing entity, I'm consistently getting the InvalidStateException inside a PersistenceException which is inside a JBossRollba... which is inside a RuntimeException.
This is very inconvenient. Is it possible to force the InvalidStateException to be thrown unwrapped from within the EJB? (aside from the EJBException wrap which can be avoided by the specification defined <application-exception> mark on InvalidStateException, as shown in my previous post).
Thanks