You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Michael Dick (JIRA)" <ji...@apache.org> on 2009/05/13 16:59:45 UTC

[jira] Commented: (OPENJPA-952) Utilize Sun JDK's Attach API to dynamically load the OpenJPA enhancer agent

    [ https://issues.apache.org/jira/browse/OPENJPA-952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708958#action_12708958 ] 

Michael Dick commented on OPENJPA-952:
--------------------------------------

I've spoken with Rick a bit and he's looking into reusing some of the code from InstrumentationFactory (thanks for pointing it out Milosz).  

> Utilize Sun JDK's Attach API to dynamically load the OpenJPA enhancer agent
> ---------------------------------------------------------------------------
>
>                 Key: OPENJPA-952
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-952
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: kernel
>    Affects Versions: 2.0.0
>         Environment: Sun 1.6 JDK. 
> Note: The Attach API is ONLY a part of the JDK, not the SDK.
>            Reporter: Rick Curtis
>            Assignee: Michael Dick
>         Attachments: OPENJPA-952.patch, OPENJPA-952.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.