[
https://jira.jboss.org/jira/browse/HIBERNATE-122?page=com.atlassian.jira....
]
Richard Kennard commented on HIBERNATE-122:
-------------------------------------------
Steve,
Yes, well, this is exactly what I'm talking about. The JBTM team are saying it's a
problem with Hibernate, and now the Hibernate team are saying it's a problem with
JBTM. Quite possibly it's a problem with both specs, but I don't know because
I'm just a user :)
Could you please contact the JBTM team and try and work this one out? It is affecting a
number of real-world use cases, not just me (see JBTM-575).
Thanks,
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