OpenJPA
  1. OpenJPA
  2. OPENJPA-696

Cache TransactionSynchronizationRegistry per EMF (vs JVM)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0, 1.2.0
    • Fix Version/s: 2.3.0
    • Component/s: kernel
    • Labels:
      None

      Description

      Discussed in OpenJPA forum first: http://n2.nabble.com/TransactionSynchronizationRegistry-reference-cached-permanently-td727197.html#a727197

      This Issue is requesting that we cache the reference for the TransactionSynchronizationRegistry in the EMF instead of per JVM. This would be similar to what we did with the TransactionManager in the past. Reference the forum postings for background and justification on the request.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1783d 10h 50m 1 Michael Dick 10/Jul/13 02:16
        Resolved Resolved Closed Closed
        696d 19h 3m 1 Mark Struberg 06/Jun/15 21:19
        Mark Struberg made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Sprint Usergrid 0 [ 1 ]
        Michael Dick made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.3.0 [ 12319463 ]
        Resolution Fixed [ 1 ]
        Hide
        Michael Dick added a comment -

        Committed patch - it's safe as far as I know. If it produces problems we can revert and cancel this issue.

        Show
        Michael Dick added a comment - Committed patch - it's safe as far as I know. If it produces problems we can revert and cancel this issue.
        Hide
        ASF subversion and git services added a comment -

        Commit 1501634 from Michael Dick
        [ https://svn.apache.org/r1501634 ]

        OPENJPA-696: Make transaction synchronization registries non-static.

        Patch is old - feel free to revert if something breaks.

        Show
        ASF subversion and git services added a comment - Commit 1501634 from Michael Dick [ https://svn.apache.org/r1501634 ] OPENJPA-696 : Make transaction synchronization registries non-static. Patch is old - feel free to revert if something breaks.
        Michael Dick made changes -
        Sprint Sprint 1 [ 1 ]
        Michael Dick made changes -
        Rank Ranked higher
        Michael Dick made changes -
        Attachment OPENJPA-696.patch.txt [ 12390943 ]
        Michael Dick made changes -
        Attachment OPENJPA-696.patch.txt [ 12390939 ]
        Michael Dick made changes -
        Attachment OPENJPA-696.patch.txt [ 12390939 ]
        Hide
        Michael Dick added a comment -

        I think the root cause here is that the xxManagedRuntime classes are static members of the AutomaticManagedRuntime class. The attached patch initializes them in AutomaticManagedRuntime's constructor.

        I've done some sniff testing and it looks like it will address the issue. I wasn't able to reproduce the exact problem reported though. If there's an easy way to test the patch with OpenEJB I'm happy to try that out as well.

        Show
        Michael Dick added a comment - I think the root cause here is that the xxManagedRuntime classes are static members of the AutomaticManagedRuntime class. The attached patch initializes them in AutomaticManagedRuntime's constructor. I've done some sniff testing and it looks like it will address the issue. I wasn't able to reproduce the exact problem reported though. If there's an easy way to test the patch with OpenEJB I'm happy to try that out as well.
        Michael Dick made changes -
        Field Original Value New Value
        Assignee Michael Dick [ mikedd ]
        Kevin Sutter created issue -

          People

          • Assignee:
            Michael Dick
            Reporter:
            Kevin Sutter
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development