Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-310

Support for TransactionAttributeType REQUIRE_NEW

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 0.4
    • 0.4
    • JPA-Module
    • None

    Description

      @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

      Attachments

        Activity

          People

            Unassigned Unassigned
            bodtx Alexis Krier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: