OpenJPA
  1. OpenJPA
  2. OPENJPA-952

Utilize Sun JDK's Attach API to dynamically load the OpenJPA enhancer agent

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0-M3
    • Component/s: kernel
    • Labels:
      None
    • Environment:
      Sun 1.6 JDK.

      Note: The Attach API is ONLY a part of the JDK, not the SDK.
    • Patch Info:
      Patch Available

      Description

      When running in a JSE environment, OpenJPA could use the Attach API to dynamically load the enhancer agent at runtime. Dynamically loading the enhancer means that an OpenJPA developer doesn't need to configure a -javaagent. Doing this would dramatically improve the out of box performance, and also improve the ease of use.

      This improvement has the following caveats:
      1.) This API is ONLY a part of the 1.6 JDK.
      2.) This API is supported by only the Sun JDK.
      3.) If the agent is loaded from the earliest OpenJPA code, the agent will be laoded when creating an EntityManager in the EntityManagerFactoryImpl. If an Entity class is loaded by the JVM before the enhancer agent is loaded, that class' byte code will not be enhanced.

      Attach API - http://java.sun.com/javase/6/docs/technotes/guides/attach/index.html

      1. OPENJPA-952.patch
        20 kB
        Rick Curtis
      2. OPENJPA-952.patch
        34 kB
        Rick Curtis
      3. OPENJPA-952.patch
        61 kB
        Rick Curtis

        Issue Links

          Activity

          Rick Curtis created issue -
          Rick Curtis made changes -
          Field Original Value New Value
          Attachment OPENJPA-952.patch [ 12401861 ]
          Rick Curtis made changes -
          Attachment OPENJPA-952.patch [ 12404363 ]
          Michael Dick made changes -
          Original Estimate 0h [ 0 ]
          Remaining Estimate 0h [ 0 ]
          Assignee Michael Dick [ mikedd ]
          Rick Curtis made changes -
          Attachment OPENJPA-952.patch [ 12408585 ]
          Donald Woods made changes -
          Patch Info [Patch Available]
          Michael Dick made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0.0 [ 12313483 ]
          Resolution Fixed [ 1 ]
          Michael Dick made changes -
          Link This issue blocks OPENJPA-1125 [ OPENJPA-1125 ]
          Michael Dick made changes -
          Fix Version/s 2.0.0 [ 12314019 ]
          Fix Version/s 2.0.0-M2 [ 12313483 ]
          Affects Version/s 2.0.0 [ 12314019 ]
          Affects Version/s 2.0.0-M2 [ 12313483 ]
          Donald Woods made changes -
          Fix Version/s 2.0.0-M3 [ 12314148 ]
          Fix Version/s 2.0.0 [ 12314019 ]
          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Rick Curtis made changes -
          Link This issue is related to OPENJPA-1734 [ OPENJPA-1734 ]
          Jason Pyeron made changes -
          Link This issue relates to OPENJPA-2036 [ OPENJPA-2036 ]
          Gavin made changes -
          Link This issue blocks OPENJPA-1125 [ OPENJPA-1125 ]
          Gavin made changes -
          Link This issue is depended upon by OPENJPA-1125 [ OPENJPA-1125 ]

            People

            • Assignee:
              Michael Dick
              Reporter:
              Rick Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development