[ 
https://issues.apache.org/jira/browse/OPENEJB-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002220#comment-13002220
 ] 

David Jencks commented on OPENEJB-1091:
---------------------------------------

I've fixed all the geronimo tm branches starting with 2.1.1 to remember why a 
transaction is marked rollback-only in a synchronization or by timing out and 
use this as the cause of the RollbackException.  cf GERONIMO-4576 
Ashish Jain has also been working on this but got pulled off into some other 
work.
In Openejb, Ashish discovered that since TransactionRolledBackException extends 
RemoteException you can't call setCause on it :-(.  The quick workaround for 
this is to use the openejb extension of TransactionRolledBackException that you 
can set the cause on.  However a much better fix would be to use the local 
exception (TransactionRolledBackLocalException?) that you can set the cause of 
and change the exception conversion code to convert the other way, local to 
remote instead of remote to local.

BTW the next few lines in openejb are wrong too since they directly call 
setCause on a RemoteException.

Here's a link to some recent mail on this:
http://mail-archives.apache.org/mod_mbox/geronimo-dev/201102.mbox/%[email protected]%3E

> Cause of RollbackException swallowed
> ------------------------------------
>
>                 Key: OPENEJB-1091
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1091
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.0-beta-2
>            Reporter: Geoff Callender
>            Assignee: Jean-Louis MONTEIRO
>             Fix For: 3.0
>
>
> This is linked to OPENEJB-782 where the problem was first noted.  The flaw 
> described there still exists in 3.1, ie. the client still has no way of 
> determining the reason a rollback occurred.
> When the client digs into the exception cause, all it finds is 
> javax.transaction.RollbackException. The originating 
> javax.persistence.PersistenceException or java.sql.SQLException is missing.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to