A slightly overcomplicated example is in the OpenJPA source code. It a bit kludgy since it's invoked during a maven build and we don't want it to run if we aren't going to run the tests in maven..
You can see the file in fisheye at [1] . The relevant portion of the file is here (I've removed some of the optional stuff) : <!-- ================================= target: enhance.all.entities ================================= --> <target name="enhance.all.entities" description="--> enhance the test entities" unless="maven.test.skip.istrue"> <echo> running enhancer</echo> <path id="cp"> <!-- make sure OpenJPA is on the classpath --> <path refid="maven.test.classpath" /> </path> <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"> <classpath refid="cp" /> </taskdef> <fileset id="enhance.path.ref" dir="${project.build.testOutputDirectory}"> <include name="**/*.class" /> <!-- optionally include or exclude more classes --> </fileset> <openjpac> <classpath refid="cp" /> <fileset refid="enhance.path.ref" /> <config log="DefaultLevel=${openjpa.loglevel}" /> </openjpac> </target> [1] http://fisheye6.atlassian.com/browse/~raw,r=697955/openjpa/trunk/openjpa-persistence-jdbc/src/main/ant/enhancer.xml Hope this helps, -mike On Tue, Mar 17, 2009 at 9:27 AM, Shubbis <marius.jo...@broadpark.no> wrote: > > > > Pinaki Poddar wrote: > > > > I do not find anything obvious in the tests that can cause the slowdown. > > Now the usual suspect: Have you enhanced Storeage/WeraHouse classes at > > build-time? > > > > > > Maybe someone could post an example of their build.xml file so that i could > try it. See if maybe its my enhancing thats the problem. > > Shubbis > -- > View this message in context: > http://n2.nabble.com/Slow-performance-with-OpenJPA-when-selecting-from-a-ManyToMany-relation.-tp2466994p2491667.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > >