You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Gianny Damour <gi...@optusnet.com.au> on 2009/01/30 10:53:13 UTC
Eclipse - javaagent enhancement
Hi,
I am unable to get javaagent based enhancement work within Eclipse.
Based on a cursory review of PCEnhancerAgent, I can see that no
ClassFileTransformer is installed when
List<String> anchors = Configurations.
getFullyQualifiedAnchorsInPropertiesLocation(opts);
returns an empty list, which it does in my case when I simply specify
the following JVM arg
-javaagent:<path to>/openjpa-1.2.0.jar
Any hint?
Thanks,
Gianny
Re: Eclipse - javaagent enhancement
Posted by Rick Curtis <cu...@gmail.com>.
Gianny -
I see in a later post that you figured out that your persistence.xml file
wasn't in your classpath, but I'm wondering how this problem was manifesting
itself? ie: What were the error messages that you were seeing? Also, what
JDK are you running on.
Thanks,
Rick
Gianny Damour wrote:
>
> Hi,
>
> I am unable to get javaagent based enhancement work within Eclipse.
>
> Based on a cursory review of PCEnhancerAgent, I can see that no
> ClassFileTransformer is installed when
>
> List<String> anchors = Configurations.
> getFullyQualifiedAnchorsInPropertiesLocation(opts);
>
> returns an empty list, which it does in my case when I simply specify
> the following JVM arg
>
> -javaagent:<path to>/openjpa-1.2.0.jar
>
>
> Any hint?
>
> Thanks,
> Gianny
>
>
>
>
>
>
--
View this message in context: http://n2.nabble.com/Eclipse---javaagent-enhancement-tp2245449p2258374.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: Eclipse - javaagent enhancement
Posted by Kevin Sutter <kw...@gmail.com>.
Thanks, Gianny,
We'll check that out as we continue improving this "out of the box"
enhancement process.
Kevin
On Fri, Jan 30, 2009 at 6:04 PM, gdamour <gd...@apache.org> wrote:
>
> Hi Kevin,
>
> After debugging, I discovered that I need to have a
> META-INF/persistence.xml
> file on my classpath for this to work otherwise no ClassFileTransformer is
> installed and hence enhancing does not work.
>
> It may be worth to explicitly state that out-of-the-box the javaagent
> requires a META-INF/persistence in the classpath to work.
>
> Thanks,
> Gianny
>
>
> Kevin Sutter wrote:
> >
> > Hi Gianny,
> > I use this all the time. On my Run configuration for the application
> that
> > I
> > am running I will put something like the following as a JVM argument...
> >
> >
> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar
> >
> > This should kick in the PCEnhancerAgent for the Entity classes that are
> > being loaded.
> >
> > Kevin
> >
> > On Fri, Jan 30, 2009 at 3:53 AM, Gianny Damour <
> > gianny.damour@optusnet.com.au> wrote:
> >
> >> Hi,
> >>
> >> I am unable to get javaagent based enhancement work within Eclipse.
> >>
> >> Based on a cursory review of PCEnhancerAgent, I can see that no
> >> ClassFileTransformer is installed when
> >>
> >> List<String> anchors = Configurations.
> >> getFullyQualifiedAnchorsInPropertiesLocation(opts);
> >>
> >> returns an empty list, which it does in my case when I simply specify
> the
> >> following JVM arg
> >>
> >> -javaagent:<path to>/openjpa-1.2.0.jar
> >>
> >>
> >> Any hint?
> >>
> >> Thanks,
> >> Gianny
> >>
> >>
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/Eclipse---javaagent-enhancement-tp2245449p2247933.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>
Re: Eclipse - javaagent enhancement
Posted by gdamour <gd...@apache.org>.
Hi Kevin,
After debugging, I discovered that I need to have a META-INF/persistence.xml
file on my classpath for this to work otherwise no ClassFileTransformer is
installed and hence enhancing does not work.
It may be worth to explicitly state that out-of-the-box the javaagent
requires a META-INF/persistence in the classpath to work.
Thanks,
Gianny
Kevin Sutter wrote:
>
> Hi Gianny,
> I use this all the time. On my Run configuration for the application that
> I
> am running I will put something like the following as a JVM argument...
>
> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar
>
> This should kick in the PCEnhancerAgent for the Entity classes that are
> being loaded.
>
> Kevin
>
> On Fri, Jan 30, 2009 at 3:53 AM, Gianny Damour <
> gianny.damour@optusnet.com.au> wrote:
>
>> Hi,
>>
>> I am unable to get javaagent based enhancement work within Eclipse.
>>
>> Based on a cursory review of PCEnhancerAgent, I can see that no
>> ClassFileTransformer is installed when
>>
>> List<String> anchors = Configurations.
>> getFullyQualifiedAnchorsInPropertiesLocation(opts);
>>
>> returns an empty list, which it does in my case when I simply specify the
>> following JVM arg
>>
>> -javaagent:<path to>/openjpa-1.2.0.jar
>>
>>
>> Any hint?
>>
>> Thanks,
>> Gianny
>>
>>
>>
>>
>>
>
>
--
View this message in context: http://n2.nabble.com/Eclipse---javaagent-enhancement-tp2245449p2247933.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: Eclipse - javaagent enhancement
Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Hi Rick,
actually I use maven but I also run them all or partially in Eclipse, especially
when debugging, and especially when there is some fiendish hidden static
somewhere that carries over state from one test to the next, despite all the
precautionary set-up and tear-down code.
Rick Curtis on 01/02/09 16:36, wrote:
> Adam -
> Is there some reason that you must run your batch tests from within eclipse?
> If eclipse isn't a must have, I'd suggest using ant to launch your batch of
> tests. That would give you the flexibility that you're looking for.
>
> Thanks,
> Rick
>
>
> Adam Hardy (SQL) wrote:
>> Hi Jeremy,
>>
>> your suggestion is exactly what I do, but unfortunately since I have to
>> specify
>> this in Eclipse in the 'installed JRE' default VM args, I can only change
>> it
>> manually, so in one batch run, I can't stop OpenJPA modifying the entity
>> beans
>> during a Hibernate or Toplink test.
>>
>> Regards
>> Adam
>>
>> Jeremy Bauer on 30/01/09 18:17, wrote:
>>> Adam,
>>>
>>> Provided you have your pu's defined separately, the agent allows you to
>>> specify a particular persistence unit for enhancement. Example:
>>>
>>> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar=pu=OpenJPAPU
>>>
>>> -Jeremy
>>>
>>> On Fri, Jan 30, 2009 at 11:05 AM, Adam Hardy
>>> <ad...@cyberspaceroad.com>wrote:
>>>
>>>> Hi Kevin,
>>>>
>>>> whilst on the subject, I'm using this in Eclipse too but there is one
>>>> thing
>>>> that it appears cannot be done.
>>>>
>>>> One of the projects I work on is a framework that is designed to be used
>>>> with any JPA provider, and the testing runs against OpenJPA as well as
>>>> Hibernate and Toplink Essentials.
>>>>
>>>> Obviously I don't want the javaagent to act on my entity classes when
>>>> I'm
>>>> running Hibernate or Toplink, but there appears to be no easy way to
>>>> stop it
>>>> from one test to another in a batch run.
>>>>
>>>> It would be interesting to know whether there are plans to abandon the
>>>> byte
>>>> code rewriting, and what the history behind its adoption is. I would
>>>> assume
>>>> that it's performance but I haven't had seen any comparative stats
>>>> between
>>>> the different JPA providers.
>>>>
>>>> Regards
>>>> Adam
>>>>
>>>>
>>>>
>>>>
>>>> Kevin Sutter on 30/01/09 15:57, wrote:
>>>>
>>>>> Hi Gianny,
>>>>> I use this all the time. On my Run configuration for the application
>>>>> that
>>>>> I
>>>>> am running I will put something like the following as a JVM argument...
>>>>>
>>>>>
>>>>> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar
>>>>>
>>>>> This should kick in the PCEnhancerAgent for the Entity classes that are
>>>>> being loaded.
>>>>>
>>>>> Kevin
>>>>>
>>>>> On Fri, Jan 30, 2009 at 3:53 AM, Gianny Damour <
>>>>> gianny.damour@optusnet.com.au> wrote:
>>>>>
>>>>> Hi,
>>>>>> I am unable to get javaagent based enhancement work within Eclipse.
>>>>>>
>>>>>> Based on a cursory review of PCEnhancerAgent, I can see that no
>>>>>> ClassFileTransformer is installed when
>>>>>>
>>>>>> List<String> anchors = Configurations.
>>>>>> getFullyQualifiedAnchorsInPropertiesLocation(opts);
>>>>>>
>>>>>> returns an empty list, which it does in my case when I simply specify
>>>>>> the
>>>>>> following JVM arg
>>>>>>
>>>>>> -javaagent:<path to>/openjpa-1.2.0.jar
>>>>>>
>>
>>
>
Re: Eclipse - javaagent enhancement
Posted by Rick Curtis <cu...@gmail.com>.
Adam -
Is there some reason that you must run your batch tests from within eclipse?
If eclipse isn't a must have, I'd suggest using ant to launch your batch of
tests. That would give you the flexibility that you're looking for.
Thanks,
Rick
Adam Hardy (SQL) wrote:
>
> Hi Jeremy,
>
> your suggestion is exactly what I do, but unfortunately since I have to
> specify
> this in Eclipse in the 'installed JRE' default VM args, I can only change
> it
> manually, so in one batch run, I can't stop OpenJPA modifying the entity
> beans
> during a Hibernate or Toplink test.
>
> Regards
> Adam
>
> Jeremy Bauer on 30/01/09 18:17, wrote:
>> Adam,
>>
>> Provided you have your pu's defined separately, the agent allows you to
>> specify a particular persistence unit for enhancement. Example:
>>
>> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar=pu=OpenJPAPU
>>
>> -Jeremy
>>
>> On Fri, Jan 30, 2009 at 11:05 AM, Adam Hardy
>> <ad...@cyberspaceroad.com>wrote:
>>
>>> Hi Kevin,
>>>
>>> whilst on the subject, I'm using this in Eclipse too but there is one
>>> thing
>>> that it appears cannot be done.
>>>
>>> One of the projects I work on is a framework that is designed to be used
>>> with any JPA provider, and the testing runs against OpenJPA as well as
>>> Hibernate and Toplink Essentials.
>>>
>>> Obviously I don't want the javaagent to act on my entity classes when
>>> I'm
>>> running Hibernate or Toplink, but there appears to be no easy way to
>>> stop it
>>> from one test to another in a batch run.
>>>
>>> It would be interesting to know whether there are plans to abandon the
>>> byte
>>> code rewriting, and what the history behind its adoption is. I would
>>> assume
>>> that it's performance but I haven't had seen any comparative stats
>>> between
>>> the different JPA providers.
>>>
>>> Regards
>>> Adam
>>>
>>>
>>>
>>>
>>> Kevin Sutter on 30/01/09 15:57, wrote:
>>>
>>>> Hi Gianny,
>>>> I use this all the time. On my Run configuration for the application
>>>> that
>>>> I
>>>> am running I will put something like the following as a JVM argument...
>>>>
>>>>
>>>> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar
>>>>
>>>> This should kick in the PCEnhancerAgent for the Entity classes that are
>>>> being loaded.
>>>>
>>>> Kevin
>>>>
>>>> On Fri, Jan 30, 2009 at 3:53 AM, Gianny Damour <
>>>> gianny.damour@optusnet.com.au> wrote:
>>>>
>>>> Hi,
>>>>> I am unable to get javaagent based enhancement work within Eclipse.
>>>>>
>>>>> Based on a cursory review of PCEnhancerAgent, I can see that no
>>>>> ClassFileTransformer is installed when
>>>>>
>>>>> List<String> anchors = Configurations.
>>>>> getFullyQualifiedAnchorsInPropertiesLocation(opts);
>>>>>
>>>>> returns an empty list, which it does in my case when I simply specify
>>>>> the
>>>>> following JVM arg
>>>>>
>>>>> -javaagent:<path to>/openjpa-1.2.0.jar
>>>>>
>>
>
>
>
--
View this message in context: http://n2.nabble.com/Eclipse---javaagent-enhancement-tp2245449p2254353.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: Eclipse - javaagent enhancement
Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Hi Jeremy,
your suggestion is exactly what I do, but unfortunately since I have to specify
this in Eclipse in the 'installed JRE' default VM args, I can only change it
manually, so in one batch run, I can't stop OpenJPA modifying the entity beans
during a Hibernate or Toplink test.
Regards
Adam
Jeremy Bauer on 30/01/09 18:17, wrote:
> Adam,
>
> Provided you have your pu's defined separately, the agent allows you to
> specify a particular persistence unit for enhancement. Example:
>
> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar=pu=OpenJPAPU
>
> -Jeremy
>
> On Fri, Jan 30, 2009 at 11:05 AM, Adam Hardy <ad...@cyberspaceroad.com>wrote:
>
>> Hi Kevin,
>>
>> whilst on the subject, I'm using this in Eclipse too but there is one thing
>> that it appears cannot be done.
>>
>> One of the projects I work on is a framework that is designed to be used
>> with any JPA provider, and the testing runs against OpenJPA as well as
>> Hibernate and Toplink Essentials.
>>
>> Obviously I don't want the javaagent to act on my entity classes when I'm
>> running Hibernate or Toplink, but there appears to be no easy way to stop it
>> from one test to another in a batch run.
>>
>> It would be interesting to know whether there are plans to abandon the byte
>> code rewriting, and what the history behind its adoption is. I would assume
>> that it's performance but I haven't had seen any comparative stats between
>> the different JPA providers.
>>
>> Regards
>> Adam
>>
>>
>>
>>
>> Kevin Sutter on 30/01/09 15:57, wrote:
>>
>>> Hi Gianny,
>>> I use this all the time. On my Run configuration for the application that
>>> I
>>> am running I will put something like the following as a JVM argument...
>>>
>>>
>>> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar
>>>
>>> This should kick in the PCEnhancerAgent for the Entity classes that are
>>> being loaded.
>>>
>>> Kevin
>>>
>>> On Fri, Jan 30, 2009 at 3:53 AM, Gianny Damour <
>>> gianny.damour@optusnet.com.au> wrote:
>>>
>>> Hi,
>>>> I am unable to get javaagent based enhancement work within Eclipse.
>>>>
>>>> Based on a cursory review of PCEnhancerAgent, I can see that no
>>>> ClassFileTransformer is installed when
>>>>
>>>> List<String> anchors = Configurations.
>>>> getFullyQualifiedAnchorsInPropertiesLocation(opts);
>>>>
>>>> returns an empty list, which it does in my case when I simply specify the
>>>> following JVM arg
>>>>
>>>> -javaagent:<path to>/openjpa-1.2.0.jar
>>>>
>
Re: Eclipse - javaagent enhancement
Posted by Jeremy Bauer <te...@gmail.com>.
Adam,
Provided you have your pu's defined separately, the agent allows you to
specify a particular persistence unit for enhancement. Example:
-javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar=pu=OpenJPAPU
-Jeremy
On Fri, Jan 30, 2009 at 11:05 AM, Adam Hardy <ad...@cyberspaceroad.com>wrote:
> Hi Kevin,
>
> whilst on the subject, I'm using this in Eclipse too but there is one thing
> that it appears cannot be done.
>
> One of the projects I work on is a framework that is designed to be used
> with any JPA provider, and the testing runs against OpenJPA as well as
> Hibernate and Toplink Essentials.
>
> Obviously I don't want the javaagent to act on my entity classes when I'm
> running Hibernate or Toplink, but there appears to be no easy way to stop it
> from one test to another in a batch run.
>
> It would be interesting to know whether there are plans to abandon the byte
> code rewriting, and what the history behind its adoption is. I would assume
> that it's performance but I haven't had seen any comparative stats between
> the different JPA providers.
>
> Regards
> Adam
>
>
>
>
> Kevin Sutter on 30/01/09 15:57, wrote:
>
>> Hi Gianny,
>> I use this all the time. On my Run configuration for the application that
>> I
>> am running I will put something like the following as a JVM argument...
>>
>>
>> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar
>>
>> This should kick in the PCEnhancerAgent for the Entity classes that are
>> being loaded.
>>
>> Kevin
>>
>> On Fri, Jan 30, 2009 at 3:53 AM, Gianny Damour <
>> gianny.damour@optusnet.com.au> wrote:
>>
>> Hi,
>>>
>>> I am unable to get javaagent based enhancement work within Eclipse.
>>>
>>> Based on a cursory review of PCEnhancerAgent, I can see that no
>>> ClassFileTransformer is installed when
>>>
>>> List<String> anchors = Configurations.
>>> getFullyQualifiedAnchorsInPropertiesLocation(opts);
>>>
>>> returns an empty list, which it does in my case when I simply specify the
>>> following JVM arg
>>>
>>> -javaagent:<path to>/openjpa-1.2.0.jar
>>>
>>
>
Re: Eclipse - javaagent enhancement
Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Kevin Sutter on 30/01/09 18:23, wrote:
> There are many advantages to the enhancement processing. Overall, our
> performance is better with byte-code enhancement. The industry benchmarks
> seem to back up this claim.
>
> But, where we would like to get is to do the bytecode enhancement without
> any special options or processing by the user. The Java 6 feature for class
> redefinition may give us that possibility. We would like to automatically
> detect whether enhancement has been specified and, if it hasn't, insert our
> enhancement processing into the classloading mechanism automatically. Prior
> to Java 6, we had to rely on the javaagent parameter, or the app server's
> container hooks, or static enhancement. Hopefully, Java 6 will allow us to
> improve on this processing.
>
> Hope this helps explain. We have some of the same concerns and are looking
> to improve on them.
Thanks v. much for the info. Most interesting, although I'll only know after a
couple of months of progress with my project what relevance that has to what I'm
doing.
Initially I'd rather not have to restrict the project to Java 6, but then if the
load tests with non-Sun JREs uncovers a blitz-schnell JRE, it wouldn't be a
problem.
However I don't think the chances of that are so great and it won't be good to
demand that users have to have Java 6.
Re: Eclipse - javaagent enhancement
Posted by Kevin Sutter <kw...@gmail.com>.
Adam,
Interesting questions, which could have very lengthy answers... But, let's
start and see where it takes us...
On Fri, Jan 30, 2009 at 11:05 AM, Adam Hardy <ad...@cyberspaceroad.com>wrote:
>
> One of the projects I work on is a framework that is designed to be used
> with any JPA provider, and the testing runs against OpenJPA as well as
> Hibernate and Toplink Essentials.
>
> Obviously I don't want the javaagent to act on my entity classes when I'm
> running Hibernate or Toplink, but there appears to be no easy way to stop it
> from one test to another in a batch run.
Right. If your jvm invocation contains the -javaagent parameter, OpenJPA
does not have another overriding option that would turn off that
processing. That's an interesting request, but we don't have anything like
that right now. We have options that you can specify on the javaagent
parameter that tells OpenJPA "how much class redefinition" we should do, but
if you're going to modify that javaagent parameter, then you might as well
remove it. You are welcome to open a JIRA feature for that request.
> It would be interesting to know whether there are plans to abandon the byte
> code rewriting, and what the history behind its adoption is. I would assume
> that it's performance but I haven't had seen any comparative stats between
> the different JPA providers.
Each JPA provider has picked thier poison and decided on the mechanism for
intercepting Entity interactions. Hibernate went the sub-classing route,
while most of the other providers went with the byte-code weaving approach.
>From an out-of-the-box experience, Hibernate's approach seems easier.
OpenJPA started down that path also. We provide a sub-classing mechanism if
normal enhancement has not been detected. But, we hit some roadblocks with
this sub-classing approach as they pertain the rest of our architecture.
Thus, it's not really ready for prime time.
There are many advantages to the enhancement processing. Overall, our
performance is better with byte-code enhancement. The industry benchmarks
seem to back up this claim.
But, where we would like to get is to do the bytecode enhancement without
any special options or processing by the user. The Java 6 feature for class
redefinition may give us that possibility. We would like to automatically
detect whether enhancement has been specified and, if it hasn't, insert our
enhancement processing into the classloading mechanism automatically. Prior
to Java 6, we had to rely on the javaagent parameter, or the app server's
container hooks, or static enhancement. Hopefully, Java 6 will allow us to
improve on this processing.
Hope this helps explain. We have some of the same concerns and are looking
to improve on them.
Kevin
>
> Regards
> Adam
>
>
>
>
> Kevin Sutter on 30/01/09 15:57, wrote:
>
>> Hi Gianny,
>> I use this all the time. On my Run configuration for the application that
>> I
>> am running I will put something like the following as a JVM argument...
>>
>>
>> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar
>>
>> This should kick in the PCEnhancerAgent for the Entity classes that are
>> being loaded.
>>
>> Kevin
>>
>> On Fri, Jan 30, 2009 at 3:53 AM, Gianny Damour <
>> gianny.damour@optusnet.com.au> wrote:
>>
>> Hi,
>>>
>>> I am unable to get javaagent based enhancement work within Eclipse.
>>>
>>> Based on a cursory review of PCEnhancerAgent, I can see that no
>>> ClassFileTransformer is installed when
>>>
>>> List<String> anchors = Configurations.
>>> getFullyQualifiedAnchorsInPropertiesLocation(opts);
>>>
>>> returns an empty list, which it does in my case when I simply specify the
>>> following JVM arg
>>>
>>> -javaagent:<path to>/openjpa-1.2.0.jar
>>>
>>
>
Re: Eclipse - javaagent enhancement
Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Hi Kevin,
whilst on the subject, I'm using this in Eclipse too but there is one thing that
it appears cannot be done.
One of the projects I work on is a framework that is designed to be used with
any JPA provider, and the testing runs against OpenJPA as well as Hibernate and
Toplink Essentials.
Obviously I don't want the javaagent to act on my entity classes when I'm
running Hibernate or Toplink, but there appears to be no easy way to stop it
from one test to another in a batch run.
It would be interesting to know whether there are plans to abandon the byte code
rewriting, and what the history behind its adoption is. I would assume that it's
performance but I haven't had seen any comparative stats between the different
JPA providers.
Regards
Adam
Kevin Sutter on 30/01/09 15:57, wrote:
> Hi Gianny,
> I use this all the time. On my Run configuration for the application that I
> am running I will put something like the following as a JVM argument...
>
> -javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar
>
> This should kick in the PCEnhancerAgent for the Entity classes that are
> being loaded.
>
> Kevin
>
> On Fri, Jan 30, 2009 at 3:53 AM, Gianny Damour <
> gianny.damour@optusnet.com.au> wrote:
>
>> Hi,
>>
>> I am unable to get javaagent based enhancement work within Eclipse.
>>
>> Based on a cursory review of PCEnhancerAgent, I can see that no
>> ClassFileTransformer is installed when
>>
>> List<String> anchors = Configurations.
>> getFullyQualifiedAnchorsInPropertiesLocation(opts);
>>
>> returns an empty list, which it does in my case when I simply specify the
>> following JVM arg
>>
>> -javaagent:<path to>/openjpa-1.2.0.jar
Re: Eclipse - javaagent enhancement
Posted by Kevin Sutter <kw...@gmail.com>.
Hi Gianny,
I use this all the time. On my Run configuration for the application that I
am running I will put something like the following as a JVM argument...
-javaagent:C:/eclipse.workspaces/3.2.2/openjpa-1.2.0/openjpa-all/target/openjpa-1.2.0.jar
This should kick in the PCEnhancerAgent for the Entity classes that are
being loaded.
Kevin
On Fri, Jan 30, 2009 at 3:53 AM, Gianny Damour <
gianny.damour@optusnet.com.au> wrote:
> Hi,
>
> I am unable to get javaagent based enhancement work within Eclipse.
>
> Based on a cursory review of PCEnhancerAgent, I can see that no
> ClassFileTransformer is installed when
>
> List<String> anchors = Configurations.
> getFullyQualifiedAnchorsInPropertiesLocation(opts);
>
> returns an empty list, which it does in my case when I simply specify the
> following JVM arg
>
> -javaagent:<path to>/openjpa-1.2.0.jar
>
>
> Any hint?
>
> Thanks,
> Gianny
>
>
>
>
>