[jboss-jira] [JBoss JIRA] Commented: (HIBERNATE-122) JBTM believe Hibernate rollsback/throws Exception in wrong order
Richard Kennard (JIRA)
jira-events at lists.jboss.org
Mon Mar 29 23:01:37 EDT 2010
[ https://jira.jboss.org/jira/browse/HIBERNATE-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12522719#action_12522719 ]
Richard Kennard commented on HIBERNATE-122:
-------------------------------------------
Steve,
I'm sorry for posting in the wrong place. I wasn't trying to create more work for you.
I looked around and thought this was the right JIRA because its description is 'issues pertaining to the integration of Hibernate with JBoss projects (mainly JBoss AS)'. I think mine is probably an issue that would go unnoticed if using Hibernate outside of JBoss AS (and JBTM).
The issue applies to the version of Hibernate shipping with JBoss AS 5.1.0.GA (JPA 1). However, the piece of code I am referring to inside AbstractEntityManagerImpl.java seems to be that way since about JBoss AS 4.2.3.
Thanks for your help,
Richard.
> JBTM believe Hibernate rollsback/throws Exception in wrong order
> ----------------------------------------------------------------
>
> Key: HIBERNATE-122
> URL: https://jira.jboss.org/jira/browse/HIBERNATE-122
> Project: Hibernate Integration
> Issue Type: Bug
> Reporter: Richard Kennard
> Assignee: Steve Ebersole
> Priority: Critical
>
> Hi guys,
> I am logging this as a 'critical' priority because it is one of those issues that 'falls between the gaps' and I need someone to take ownership of it.
> As reported in JBTM-575, since JBoss 4.x the AS has stopped properly reporting JPA errors. It used to properly report the cause, but now in many situations it simply says 'setRollbackOnly called from'. The original exception is not contained as part of Exception.getCause(). It some cases the original Exception is not even output in the logs. This makes debugging extremely difficult.
> The JBTM team believe their implementation is correct, but that Hibernate's AbstractEntityManagerImpl is at fault. Specifically, Hibernate does...
> public void throwPersistenceException(PersistenceException e) {
> ...
> markAsRollback();
> throw e;
> }
> ...and the JBTM team say "What's key here is that, from the transaction manager's perspective, the setRollbackOnly call precedes the exception - hibernate sets the tx to rollback before throwing the exception... you basically want [JBTM] to put in a workaround to resequence the events back into causal order after hibernate has messed them up. I'm not going to do that, because it will have the side effect of..."
> As an outsider, I cannot say whether JBTM or Hibernate is truly at fault, but I would dearly like to see this resolved.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list