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
>> <[email protected]>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 <
>>>> [email protected]> 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.

Reply via email to