[jbossts-issues] [JBoss JIRA] Commented: (JBTM-575) javax.transaction.RollbackException root cause

Jonathan Halliday (JIRA) jira-events at lists.jboss.org
Thu Jan 21 06:39:19 EST 2010


    [ https://jira.jboss.org/jira/browse/JBTM-575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12507473#action_12507473 ] 

Jonathan Halliday commented on JBTM-575:
----------------------------------------

Right, I think I get it now. You basically want me 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 breaking reporting of e.g.

setRollbackOnly();
// time passes
// something unrelated goes wrong

cases which are currently correct and will become misleading if the 'something unrelated' is made to appear as being the root cause of a rollbackOnly that actually occurred before it.

Your best bet as a workaround for this specific scenario, unless you fancy persuading hibernate to stop messing with causality, is probably to call the session flush directly rather than relying on the beforeCompletion to do it. That should allow you to catch and process the exception in your own code rather than having to mess with the rollback.initCause.





> javax.transaction.RollbackException root cause
> ----------------------------------------------
>
>                 Key: JBTM-575
>                 URL: https://jira.jboss.org/jira/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
>
> 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/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbossts-issues mailing list