HI Kevin, I am running inside of the JEE container, I am running "Roller" (which has a a fair amount of JPA objects), but the enhacement is not happening on the fly.
Perhaps you can fill me in in option 2. I tried to use the -javaagent but I didn't find a way of passing this argument to the JVM that Eclipse/WTP is using to launch tomcat. Here are the first 3 lines of my exception, if that helps: ----- Original Message ---- From: Kevin Sutter <[EMAIL PROTECTED]> To: [email protected] Sent: Tuesday, September 30, 2008 9:12:11 AM Subject: Re: can I run without enhancements? Angel, There is a "fallback enhancement" process that uses sub-classing, but previous appends to the forums indicate that this is not a production-ready process. This is really meant for the simple "out of the box" applications for demonstration purposes. Real applications should use some type of byte code enhancement to get the best results. Methods of performing the byte code enhancement: o If running within a Java EE Container environment, let the OpenJPA provider tie into the container's classloading mechanism and the enhancement will happen on the fly when the entity classes are loaded into memory. o Run the PCEnhancer process on your entity classes during your build/packaging step. Running this within Eclipse is not that difficult -- I do this quite often. I just setup a separate Run definition to run the PCEnhancer against the project that contains my entity classes and I pass in the persistence.xml file that defines my persistence unit. If you don't have a large number of classes to enhance, you could also just pass in the names of the entity classes that you want enhanced. o Another alternative is to use the -javaagent option on the JVM invocation and pass in the OpenJPA jar file. This ties into the JVM's classloading mechanism much like the Java EE Container described above. When the entity classes are loaded into the JVM, they will be enhanced on the fly. I use this mechanism within Eclipse as well. Hope this helps, Kevin On Mon, Sep 29, 2008 at 8:35 PM, Angel Vera <[EMAIL PROTECTED]> wrote: > I am trying to debug an roller (a blog application) which I am running > inside of eclipse, but I have no easy way of running the JPAEnhancer. > > > > ----- Original Message ---- > From: Andrei Tchijov <[EMAIL PROTECTED]> > To: [email protected] > Sent: Monday, September 29, 2008 8:50:58 PM > Subject: Re: can I run without enhancements? > > Just curious, are you trying to figure out the way to profile JPA > Application? > > I was wondering about the same question when I was trying > (unsuccessfully) to profile my JPA App. > > On Sep 29, 2008, at 20:36 , Angel Vera wrote: > > > Is it possible to run a JPA application wihtout the JPA enhancer and > > wihtout enhancing the classes? > > > > > > > > > > __________________________________________________________________ > > Get the name you've always wanted @ymail.com or @rocketmail.com! Go > > to http://ca.promos.yahoo.com/jacko/ > > > __________________________________________________________________ > Looking for the perfect gift? Give the gift of Flickr! > > http://www.flickr.com/gift/ __________________________________________________________________ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/
