[
https://jira.jboss.org/browse/JBTM-575?page=com.atlassian.jira.plugin.sys...
]
Jonathan Halliday commented on JBTM-575:
----------------------------------------
Right you 'orrible lot, here is the plan:
if setRollbackOnly() is called before commit() then the initCause is 'setRollbackOnly
called from...' regardless of anything that may go wrong during the commit.
beforeCompletions (e.g. hibernate session flush) won't be called anyhow.
otherwise if getDeferredThrowable is non null then the initCause is the deferredThrowable.
Even if setRollbackOnly is also called before the exception is received. (Ick. I'm not
happy, but I'm outnumbered by pragmatists.)
otherwise if setRollbackOnly was called then it is the root cause. This covers the case
where a beforeCompletion calls setRollbackOnly but does not throw an exception.
If you're going to moan and whine now would be a good time...
javax.transaction.RollbackException root cause
----------------------------------------------
Key: JBTM-575
URL:
https://jira.jboss.org/browse/JBTM-575
Project: JBoss Transaction Manager
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: JTA
Affects Versions: 4.7.0
Environment: JBoss 5.1.0.GA
Reporter: Richard Kennard
Assignee: Jonathan Halliday
In JBoss 4.2.3.GA and previous releases, when a transaction rolled back the
RollbackException included the root cause of the exception. This enhancement was
implemented in response to JBAS-4238 and JBTM-66.
However, in JBoss 5.1.0.GA this enhancement has been lost in some scenarios. This does
not affect manual debugging (the root cause is still logged higher up in the logs), but
makes it difficult for application code that relies on being able to unwrap the
RollbackException to determine its root cause and therefore take appropriate action.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira