You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Gerhard Petracek (JIRA)" <ji...@apache.org> on 2013/01/18 18:18:13 UTC

[jira] [Resolved] (DELTASPIKE-310) Support for TransactionAttributeType REQUIRE_NEW

     [ https://issues.apache.org/jira/browse/DELTASPIKE-310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek resolved DELTASPIKE-310.
-----------------------------------------

    Resolution: Won't Fix

there isn't a portable way to do it for 'RESOURCE_LOCAL' transactions
                
> Support for TransactionAttributeType REQUIRE_NEW 
> -------------------------------------------------
>
>                 Key: DELTASPIKE-310
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-310
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: JPA-Module
>    Affects Versions: 0.4-incubating
>            Reporter: Alexis Krier
>             Fix For: 0.5-incubating
>
>
> @Transactional currently open a transaction when method is invoked.
> if a sub method is invoked also annoted @Transactional the second method uses the first method transaction and not a new one.
> ex:
> @Transactional
> void createEntity(){
>   ...
>   audit()
>    throw Exception("a problem occurs here")
> }
> @transactional
> void audit(){
>    //persist some audit stuff
>    ...
> }
> Actually everything is rolled back because of the exception in the top method (createEntity)
> @transactional should have a parameter like (REQUIRE_NEW, NEVER...) to handle with details transaction's lifecycle

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira