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 20:27:27 UTC

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

     [ 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.