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