[jboss-jira] [JBoss JIRA] Commented: (HIBERNATE-122) JBTM believe Hibernate rollsback/throws Exception in wrong order
Steve Ebersole (JIRA)
jira-events at lists.jboss.org
Tue Mar 30 00:03:38 EDT 2010
[ https://jira.jboss.org/jira/browse/HIBERNATE-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12522726#action_12522726 ]
Steve Ebersole commented on HIBERNATE-122:
------------------------------------------
Since when is curiosity about something considered blaming someone for something. Man. Tough crowd.
> 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