basically openjpa jar is only used when using openjpa as provider so can be surely removed (with some of its deps)
*Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/5/5 Howard W. Smith, Jr. <[email protected]> > The only OpenJPA JAR I could find was openjpa-asm-shaded-2.2.0.jar. > > 1. I deleted that file from tomee/lib > 2. started TomEE, saw no warning, errors, or class not found exception at > startup in the log file > 3. ran my web app, saw no issues > 4. my app has @Schedule, which invoked silently (only errors show up in the > log); saw no issues > 5. i used JMS/ActiveMQ to do some asynchronous tasks (after logging into > web app), saw no issues > > > > > On Sun, May 5, 2013 at 6:21 AM, Romain Manni-Bucau <[email protected] > >wrote: > > > I dont recall exactly without looking the code but can be used for other > > providers. Only hibernate is particular > > Le 5 mai 2013 12:05, "Howard W. Smith, Jr." <[email protected]> a > > écrit : > > > > > If for OpenJPA only, why is tomee giving the warning on startup? I only > > use > > > eclipselink, and tomee.xml only has my derby JTA resource. > > > > > > Is OpenJPA used internally by tomee at runtime for other services/etc? > > > > > > Is the warning there because, OpenJPA is in my tomee/lib? If I delete > > > OpenJPA from tomee/lib, would that break tomee, because tomee is > > dependent > > > on OpenJPA even though I have no tomee resource that need it? > > > > > > I'm using tomee simple MDB example in my app, so i have no special > > ActiveMQ > > > config specified. Is OpenJPA a dependency for tomee simple MDB example? > > > > > > I have @schedule in my app and multiple singleton beans. Does quartz > > timer > > > have OpenJPA as a dependency? > > > On May 5, 2013 5:09 AM, "Romain Manni-Bucau" <[email protected]> > > > wrote: > > > > > > > It is only relevant when vlasses not enhanced at runtime and mainly > > used > > > > for openjpa > > > > Le 4 mai 2013 23:59, "Howard W. Smith, Jr." <[email protected]> > a > > > > écrit : > > > > > > > > > I added the following as java option, > > > > > > > > > > > > > > -javaagent:D:\apache-tomee-plus-1.6.0-SNAPSHOT\lib\openejb-javaagent.jar > > > > > > > > > > and the WARNING is no longer in the catalina/tomcat7-stderr log. > > > > > > > > > > > > > > > On Sat, May 4, 2013 at 5:02 PM, Howard W. Smith, Jr. < > > > > > [email protected] > > > > > > wrote: > > > > > > > > > > > Well, I was just looking at the server log on production server. > > > Please > > > > > > note/remember that I am using TomEE 1.6.0 snapshot (2013-04-29). > > The > > > > > > WARNING below makes me think that I should add the javaagent to > my > > > > memory > > > > > > options. Please advise. > > > > > > > > > > > > > > > > > > May 04, 2013 8:05:35 AM > > > > > > > > > > > > > > > > > > > > > org.apache.openejb.assembler.classic.Assembler$PersistenceClassLoaderHandlerImpl > > > > > > addTransformer > > > > > > > > > > > > WARNING: JAVA AGENT NOT INSTALLED. The JPA Persistence Provider > > > > requested > > > > > > installation of a ClassFileTransformer which requires a > JavaAgent. > > > See > > > > > > http://openejb.apache.org/3.0/javaagent.html > > > > > > > > > > > > > > > > > > Below are the lines that followed t he above lines in > > server/catalina > > > > > log. > > > > > > As you see below, i'm using EclipseLink as my JPA provider. > > > > > > > > > > > > May 04, 2013 8:05:35 AM > > > > > > > org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory > > > > > > createDelegate > > > > > > INFO: PersistenceUnit(name=mcmsPU, > > > > > > provider=org.eclipse.persistence.jpa.PersistenceProvider) - > > provider > > > > time > > > > > > 653ms > > > > > > > > > > > > > > > > > > I guess I should add javaagent to my tomee java options. Right? > > > > > > > > > > > > > > > > > > On Sat, Apr 6, 2013 at 11:57 AM, Howard W. Smith, Jr. < > > > > > > [email protected]> wrote: > > > > > > > > > > > >> interesting. okay, well, you and I discussed something similar > > > (months > > > > > >> ago), and at that time you advised that I can/should consider > > > weaving > > > > my > > > > > >> jpa entities for better performance, but honestly, i never did > > that, > > > > and > > > > > >> therefore, at the moment, i really have no need for this being > > added > > > > to > > > > > my > > > > > >> java options. :) > > > > > >> > > > > > >> as always, thanks Romain! > > > > > >> > > > > > >> > > > > > >> > > > > > >> On Sat, Apr 6, 2013 at 10:56 AM, Romain Manni-Bucau < > > > > > >> [email protected]> wrote: > > > > > >> > > > > > >>> The javaagentis used for jpa enhancement. Not having itmeans > you > > > dont > > > > > use > > > > > >>> it (hibernate or build time enhancement) > > > > > >>> Le 6 avr. 2013 16:07, "Howard W. Smith, Jr." < > > > [email protected] > > > > > > > > > > a > > > > > >>> écrit : > > > > > >>> > > > > > >>> > What are the pros/cons of adding the following to java > options > > > when > > > > > >>> running > > > > > >>> > app in/on TomEE via (Windows) service? > > > > > >>> > > > > > > >>> > > > > > > >>> > > > > > > > > > -javaagent:C:\apache-tomee-plus-1.6.0-SNAPSHOT\lib\openejb-javaagent.jar > > > > > >>> > > > > > > >>> > I recognized that NetBeans adds this automatically to java > > > options, > > > > > >>> when I > > > > > >>> > start TomEE via netBeans. I recognized this while trying to > get > > > the > > > > > >>> > Sampler>Memory button enabled in Java Visual VM for TomEE > > running > > > > as > > > > > >>> > Windows service on production server[1]. > > > > > >>> > > > > > > >>> > So, I added openejb-javaagent.jar to java options, and that > did > > > not > > > > > >>> solve > > > > > >>> > the problem (and after some research, sampler>memory button > > will > > > be > > > > > >>> > enabled, if tomee-running-as-service and java visual vm...are > > the > > > > > same > > > > > >>> > 'user'...that's my assumption, at least). > > > > > >>> > > > > > > >>> > So, back to the question, what are the pros/cons of adding > > > > > >>> > openejb-javaagent.jar to java options of > > > tomee-running-as-service? > > > > > >>> > > > > > > >>> > Thanks, > > > > > >>> > Howard > > > > > >>> > > > > > > >>> > [1] > > > > > >>> > > > > > > >>> > > > > > > >>> > > > > > > > > > > > > > > > http://stackoverflow.com/questions/8799929/visualvm-unable-to-sampler-memory > > > > > >>> > > > > > > >>> > > > > > >> > > > > > >> > > > > > > > > > > > > > > > > > > > > >
