You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Alexis Krier (JIRA)" <ji...@apache.org> on 2013/01/17 22:56:12 UTC

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

Alexis Krier created DELTASPIKE-310:
---------------------------------------

             Summary: 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