Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1783

TransactionRequiredException when non-transactional method precedes a transactional one in the same service.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: jpa-2.5.0
    • Fix Version/s: jpa-2.7.1
    • Component/s: JPA
    • Labels:
      None

      Description

      Assume I have a service implementation with a method annotated with @Transactional and one of TxTypes not starting a transaction:

      • NEVER
      • NOT_SUPPORTED
      • SUPPORTS

      From that non-transactional method I want to use a self-reference resolved via BundleContext to call a transactional method in the same service, annotated with one of those TxTypes:

      • REQUIRED
      • REQURES_NEW

      Since the resolved self-reference is a proxied object I expect it to be able to start a new transaction. This is not the case however and the subject exception occurs.

       

      I created a test case revealing the issue in the following pull request: https://github.com/apache/aries-jpa/pull/2

        Attachments

          Activity

            People

            • Assignee:
              cschneider Christian Schneider
              Reporter:
              soundcracker@gmail.com Daniel Estermann
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m