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

Jonathan Halliday (JIRA) jira-events at lists.jboss.org
Tue Sep 14 06:05:12 EDT 2010

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

Jonathan Halliday commented on JBTM-575:

ok, let me clarify that - the specs mandates calling setRolllbackOnly and make no specific provision for being inside beforeCompletion. It's possible to comply with the spirit of the spec (i.e. 'ensure tx rollback') whilst violating its letter, by throwing an exception instead, if you can detect you are inside beforeCompletion. That's tricky at best

My current thinking on this is to solve the problem from the other side: if the tx manager gets a setRollbackOnly call and exception whilst processing beforeCompletion, it should have the option to reorder them on the basis that the setRollbackOnly call is likely a result of the exception, despite the tx manager actually seeing the setRollbackOnly before the exception. If the API supported setRollbackOnly(Throwable cause) we'd be better off, but the real world just aint that simple.

> 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


More information about the jbossts-issues mailing list