[hibernate-issues] [Hibernate-JIRA] Created: (BVAL-210) Make sure JTA / Java EE plays well with Bean Validation + JPA when exceptions occurs
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Tue Sep 14 06:14:20 EDT 2010
Make sure JTA / Java EE plays well with Bean Validation + JPA when exceptions occurs
------------------------------------------------------------------------------------
Key: BVAL-210
URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-210
Project: Bean Validation
Issue Type: Improvement
Reporter: Emmanuel Bernard
Not a BV issue per se but when a ConstraintViolationException is raised during a flush operation in JPA and the flush operation is triggered during the beforeCommit phase of the Tx, there is a loophole
- JPA wraps the exception into a RollbackException (bad in itself btw as it's not consistent with what happens when the user manually calls flush())
- JPA mark the Tx as setRollbackOnly()
Some Tx managers (eg. JBoss TS) do not report the cause exception because it considers setRollbackOnly and its associated stacktrace as more important (information wise) as the original exception.
A method like setRollbackOnly(rootException) could solve the problem.
For more background information, see
https://jira.jboss.org/browse/JBTM-575
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list