You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Joe Bohn (JIRA)" <ji...@apache.org> on 2010/03/17 19:17:27 UTC

[jira] Created: (ARIES-258) Declarative Transaction is not rolled back when RuntimeException is thrown

Declarative Transaction is not rolled back when RuntimeException is thrown
--------------------------------------------------------------------------

                 Key: ARIES-258
                 URL: https://issues.apache.org/jira/browse/ARIES-258
             Project: Aries
          Issue Type: Bug
          Components: Transaction
    Affects Versions: 0.1
            Reporter: Joe Bohn
             Fix For: 0.1


In the AriesTrader sample I wanted to test that the DataSource was being properly enlisted in the XA transaction.  So I threw a RuntimeException immediately after persisting some entities expecting that the transaction would be rolled back and the entities not committed to the Database.  However, the entities were actually committed to the DB.  

It turns out that the blueprint bean method that I was using declared that it threw Exception and since RuntimeException is a subclass of Exception it considered this an expected exception and did not rollback the transaction.  Much thanks to Brian De Pradine for figuring out what was going on here.  

The transaction interceptor should check if the exception being thrown is a "RuntimeException" and if so perform the rollback.  

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


[jira] Assigned: (ARIES-258) Declarative Transaction is not rolled back when RuntimeException is thrown

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

Joe Bohn reassigned ARIES-258:
------------------------------

    Assignee: Joe Bohn

> Declarative Transaction is not rolled back when RuntimeException is thrown
> --------------------------------------------------------------------------
>
>                 Key: ARIES-258
>                 URL: https://issues.apache.org/jira/browse/ARIES-258
>             Project: Aries
>          Issue Type: Bug
>          Components: Transaction
>    Affects Versions: 0.1
>            Reporter: Joe Bohn
>            Assignee: Joe Bohn
>             Fix For: 0.1
>
>         Attachments: patch.txt
>
>
> In the AriesTrader sample I wanted to test that the DataSource was being properly enlisted in the XA transaction.  So I threw a RuntimeException immediately after persisting some entities expecting that the transaction would be rolled back and the entities not committed to the Database.  However, the entities were actually committed to the DB.  
> It turns out that the blueprint bean method that I was using declared that it threw Exception and since RuntimeException is a subclass of Exception it considered this an expected exception and did not rollback the transaction.  Much thanks to Brian De Pradine for figuring out what was going on here.  
> The transaction interceptor should check if the exception being thrown is a "RuntimeException" and if so perform the rollback.  

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


[jira] Closed: (ARIES-258) Declarative Transaction is not rolled back when RuntimeException is thrown

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

Joe Bohn closed ARIES-258.
--------------------------


> Declarative Transaction is not rolled back when RuntimeException is thrown
> --------------------------------------------------------------------------
>
>                 Key: ARIES-258
>                 URL: https://issues.apache.org/jira/browse/ARIES-258
>             Project: Aries
>          Issue Type: Bug
>          Components: Transaction
>    Affects Versions: 0.1
>            Reporter: Joe Bohn
>            Assignee: Joe Bohn
>             Fix For: 0.1
>
>         Attachments: patch.txt
>
>
> In the AriesTrader sample I wanted to test that the DataSource was being properly enlisted in the XA transaction.  So I threw a RuntimeException immediately after persisting some entities expecting that the transaction would be rolled back and the entities not committed to the Database.  However, the entities were actually committed to the DB.  
> It turns out that the blueprint bean method that I was using declared that it threw Exception and since RuntimeException is a subclass of Exception it considered this an expected exception and did not rollback the transaction.  Much thanks to Brian De Pradine for figuring out what was going on here.  
> The transaction interceptor should check if the exception being thrown is a "RuntimeException" and if so perform the rollback.  

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


[jira] Updated: (ARIES-258) Declarative Transaction is not rolled back when RuntimeException is thrown

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

Brian DePradine updated ARIES-258:
----------------------------------

    Attachment: patch.txt

Attaching a patch to address this issue.

> Declarative Transaction is not rolled back when RuntimeException is thrown
> --------------------------------------------------------------------------
>
>                 Key: ARIES-258
>                 URL: https://issues.apache.org/jira/browse/ARIES-258
>             Project: Aries
>          Issue Type: Bug
>          Components: Transaction
>    Affects Versions: 0.1
>            Reporter: Joe Bohn
>             Fix For: 0.1
>
>         Attachments: patch.txt
>
>
> In the AriesTrader sample I wanted to test that the DataSource was being properly enlisted in the XA transaction.  So I threw a RuntimeException immediately after persisting some entities expecting that the transaction would be rolled back and the entities not committed to the Database.  However, the entities were actually committed to the DB.  
> It turns out that the blueprint bean method that I was using declared that it threw Exception and since RuntimeException is a subclass of Exception it considered this an expected exception and did not rollback the transaction.  Much thanks to Brian De Pradine for figuring out what was going on here.  
> The transaction interceptor should check if the exception being thrown is a "RuntimeException" and if so perform the rollback.  

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


[jira] Work started: (ARIES-258) Declarative Transaction is not rolled back when RuntimeException is thrown

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

Work on ARIES-258 started by Joe Bohn.

> Declarative Transaction is not rolled back when RuntimeException is thrown
> --------------------------------------------------------------------------
>
>                 Key: ARIES-258
>                 URL: https://issues.apache.org/jira/browse/ARIES-258
>             Project: Aries
>          Issue Type: Bug
>          Components: Transaction
>    Affects Versions: 0.1
>            Reporter: Joe Bohn
>            Assignee: Joe Bohn
>             Fix For: 0.1
>
>         Attachments: patch.txt
>
>
> In the AriesTrader sample I wanted to test that the DataSource was being properly enlisted in the XA transaction.  So I threw a RuntimeException immediately after persisting some entities expecting that the transaction would be rolled back and the entities not committed to the Database.  However, the entities were actually committed to the DB.  
> It turns out that the blueprint bean method that I was using declared that it threw Exception and since RuntimeException is a subclass of Exception it considered this an expected exception and did not rollback the transaction.  Much thanks to Brian De Pradine for figuring out what was going on here.  
> The transaction interceptor should check if the exception being thrown is a "RuntimeException" and if so perform the rollback.  

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


[jira] Resolved: (ARIES-258) Declarative Transaction is not rolled back when RuntimeException is thrown

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

Joe Bohn resolved ARIES-258.
----------------------------

    Resolution: Fixed

Thanks for the patch Brian.  Works great!

> Declarative Transaction is not rolled back when RuntimeException is thrown
> --------------------------------------------------------------------------
>
>                 Key: ARIES-258
>                 URL: https://issues.apache.org/jira/browse/ARIES-258
>             Project: Aries
>          Issue Type: Bug
>          Components: Transaction
>    Affects Versions: 0.1
>            Reporter: Joe Bohn
>            Assignee: Joe Bohn
>             Fix For: 0.1
>
>         Attachments: patch.txt
>
>
> In the AriesTrader sample I wanted to test that the DataSource was being properly enlisted in the XA transaction.  So I threw a RuntimeException immediately after persisting some entities expecting that the transaction would be rolled back and the entities not committed to the Database.  However, the entities were actually committed to the DB.  
> It turns out that the blueprint bean method that I was using declared that it threw Exception and since RuntimeException is a subclass of Exception it considered this an expected exception and did not rollback the transaction.  Much thanks to Brian De Pradine for figuring out what was going on here.  
> The transaction interceptor should check if the exception being thrown is a "RuntimeException" and if so perform the rollback.  

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