You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2008/03/18 01:08:24 UTC

[jira] Created: (OPENEJB-782) RollbackException swallowed in TransactionPolicy

RollbackException swallowed in TransactionPolicy
------------------------------------------------

                 Key: OPENEJB-782
                 URL: https://issues.apache.org/jira/browse/OPENEJB-782
             Project: OpenEJB
          Issue Type: Bug
          Components: server
    Affects Versions: 3.0-beta-2
            Reporter: David Jencks
            Assignee: David Jencks
             Fix For: 3.0


See https://issues.apache.org/jira/browse/GERONIMO-3907 where a user discovered the problem

Looks like EJB 3 core spec 14.3.10 says we should be throwing an EJBException or maybe RemoteException here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENEJB-782) RollbackException swallowed in TransactionPolicy

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12583902#action_12583902 ] 

David Jencks commented on OPENEJB-782:
--------------------------------------

we found some more problems.... we have to treat a rollback problem as an application exception.  Additional fix in rev 643179.

Its not quite clear how to deal with the heuristic exceptions, they may need the same treatment.

> RollbackException swallowed in TransactionPolicy
> ------------------------------------------------
>
>                 Key: OPENEJB-782
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-782
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.0-beta-2
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 3.0
>
>
> See https://issues.apache.org/jira/browse/GERONIMO-3907 where a user discovered the problem
> Looks like EJB 3 core spec 14.3.10 says we should be throwing an EJBException or maybe RemoteException here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OPENEJB-782) RollbackException swallowed in TransactionPolicy

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins closed OPENEJB-782.
---------------------------------

    Resolution: Fixed

Looks good to me too.

> RollbackException swallowed in TransactionPolicy
> ------------------------------------------------
>
>                 Key: OPENEJB-782
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-782
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.0-beta-2
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 3.0
>
>
> See https://issues.apache.org/jira/browse/GERONIMO-3907 where a user discovered the problem
> Looks like EJB 3 core spec 14.3.10 says we should be throwing an EJBException or maybe RemoteException here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENEJB-782) RollbackException swallowed in TransactionPolicy

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579737#action_12579737 ] 

David Jencks commented on OPENEJB-782:
--------------------------------------

Likely fix committed in rev 638225.

> RollbackException swallowed in TransactionPolicy
> ------------------------------------------------
>
>                 Key: OPENEJB-782
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-782
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.0-beta-2
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 3.0
>
>
> See https://issues.apache.org/jira/browse/GERONIMO-3907 where a user discovered the problem
> Looks like EJB 3 core spec 14.3.10 says we should be throwing an EJBException or maybe RemoteException here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENEJB-782) RollbackException swallowed in TransactionPolicy

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636353#action_12636353 ] 

Vincent MATHON commented on OPENEJB-782:
----------------------------------------

In OpenEJB 3.0, the code in the TransactionPolicy class replace the RollbackException  by an ApplicationException with a javax.transaction.TransactionRolledBackException as the root cause. So, we still loose the root cause as described in https://issues.apache.org/jira/browse/GERONIMO-3907, so this issue is not fixed.

> RollbackException swallowed in TransactionPolicy
> ------------------------------------------------
>
>                 Key: OPENEJB-782
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-782
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.0-beta-2
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 3.0
>
>
> See https://issues.apache.org/jira/browse/GERONIMO-3907 where a user discovered the problem
> Looks like EJB 3 core spec 14.3.10 says we should be throwing an EJBException or maybe RemoteException here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENEJB-782) RollbackException swallowed in TransactionPolicy

Posted by "Geoff Callender (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658811#action_12658811 ] 

Geoff Callender commented on OPENEJB-782:
-----------------------------------------

It turns out that there are 2 different effects at work in the examples I described above:

1. Client not receiving validation exception thrown in ejb.  This works fine if the exception is annotated with @ApplicationException.  It does not work if the annotation is instead on a superclass of the exception.  See https://issues.apache.org/jira/browse/OPENEJB-980 .

2. Client unable to get cause when server-side fails during implicit commit.  There is a workaround to this - at the end of each session bean method, add a flush in a try-catch block and convert the exception to one of your own as in 1. above.  It may be even better to apply an interceptor to all such methods.  

Regarding #2, the question is, is it reasonable that every method should have to do its own flush considering the commit will also do one?  Wouldn't it be good to enable the client to get the cause of such exceptions so that it can interpret the exception in the context of what the user was trying to do?

> RollbackException swallowed in TransactionPolicy
> ------------------------------------------------
>
>                 Key: OPENEJB-782
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-782
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.0-beta-2
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 3.0
>
>
> See https://issues.apache.org/jira/browse/GERONIMO-3907 where a user discovered the problem
> Looks like EJB 3 core spec 14.3.10 says we should be throwing an EJBException or maybe RemoteException here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENEJB-782) RollbackException swallowed in TransactionPolicy

Posted by "Geoff Callender (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658510#action_12658510 ] 

Geoff Callender commented on OPENEJB-782:
-----------------------------------------

This surely is not right.  The cause should be made available (as it is with JBoss), so that the client can decide what to report.  

Currently I cannot even determine when my entity has thrown a validation exception.  It's available server-side: using hibernate as the provider, the validation exception gets wrapped in a RuntimeException which is wrapped in a javax.persistence.PersistenceException. 

Before using openejb my client would unpack this and be able to tell the client how it failed validation.  Why deprive the client of this useful info?

Another example: attempting to deleting an entity that is referenced. Server-side it results in am SQLException wrapped in a org.hibernate.exception.ConstraintViolationException wrapped in a javax.persistence.PersistenceException.  Yet all the client gets is a RollbackException in an EJBTransactionRolledbackException, which tells it next to nothing.

By the way, it's using a javax.transaction.RollbackException - should it be a javax.persistence.RollbackException?

> RollbackException swallowed in TransactionPolicy
> ------------------------------------------------
>
>                 Key: OPENEJB-782
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-782
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.0-beta-2
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: 3.0
>
>
> See https://issues.apache.org/jira/browse/GERONIMO-3907 where a user discovered the problem
> Looks like EJB 3 core spec 14.3.10 says we should be throwing an EJBException or maybe RemoteException here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.