Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-952

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0-M3
    • kernel
    • None
    • Sun 1.6 JDK.

      Note: The Attach API is ONLY a part of the JDK, not the SDK.
    • 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

      Attachments

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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mikedd Michael Dick
            curtisr7 Richard G. Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment