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