org.hibernate.exception.ConstraintViolationException can not be catched in JBOSS 6
<br>
       <p>I am developing an web application by using Spring MVC 3.0.This application gets deployed on JBOSS 6.</p>
       <p>Problem statement is - Whenever <strong><i>org.hibernate.exception.ConstraintViolationException</i></strong> gets occured , The JBOSS 6 does not catch it.Instead of that it returns following exception - <br><i><strong>org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout)</strong>; nested exception is javax.transaction.RollbackException:</i>

        But for the same scenario we get an exception -  org.hibernate.exception.ConstraintViolationException only for Tomcat 6.x or greater.

         so, I added catch block to catch 'UnexpectedRollbackException' in the code to handle it.But I dont think it is a good practice.Please put some idea / solution regarding this. 


 
org.hibernate.exception.ConstraintViolationException can not be catched in JBOSS 6
===

<br>
       <p>I am developing an web application by using Spring MVC 3.0.This application gets deployed on JBOSS 6.</p>
       <p>Problem statement is - Whenever <strong><i>org.hibernate.exception.ConstraintViolationException</i></strong> gets occured , The JBOSS 6 does not catch it.Instead of that it returns following exception - <br><i><strong>org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout)</strong>; nested exception is javax.transaction.RollbackException:</i>

        But for the same scenario we get an exception -  org.hibernate.exception.ConstraintViolationException only for Tomcat 6.x or greater.

         so, I added catch block to catch 'UnexpectedRollbackException' in the code to handle it.But I dont think it is a good practice.Please put some idea / solution regarding this. 


 