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>
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).