Hello Donald, 

thank you very much for your answer.

I already heard of that plug-in and would use it in case of doubt. But because 
of some security restrictions in my company also including Eclipse plug-ins, I 
would prefer an Ant solution to be able to hand-off the project without forcing 
everybody to install this plug-in.

-Naomi

-------- Original-Nachricht --------
> Datum: Mon, 18 May 2009 09:43:39 -0400
> Von: Donald Woods <dwo...@apache.org>
> An: users@openjpa.apache.org
> Betreff: Re: Runtime Enhancement: Problems with Ant Task in Eclipse

> Since you're using Eclipse, maybe taking a look at the experimental 
> Eclipse plugin for OpenJPA 1.2 would help?
> 
> http://people.apache.org/~ppoddar/eclipse/
> 
> 
> -Donald
> 
> 
> naomi-...@gmx.de wrote:
> > Hello everybody,
> > 
> > I have got another problem. This time it is a problem with runtime
> enhancement.
> > 
> > I am enhancing my classes with the following ant script started from
> Eclipse:
> > 
> > <project name="jpa_enhance_builder">
> >     
> >     <path id="enhance.cp">
> >             <pathelement location="${basedir}${file.separator}bin"/>
> >             
> >             <fileset dir="${basedir}${file.separator}lib/OpenJPA_1.2.1">
> >                     <include name="**/*.jar"/>
> >             </fileset>
> >     </path>
> >     
> >     <path id="compile.classpath">
> >             <fileset dir="${basedir}${file.separator}/lib">
> >                     <include name="**/*.jar"/>
> >             </fileset>
> >             
> >             <fileset dir="C:\GhostTO\workspace\XFTu\bin">
> >                     <include name="**/*.class"/>
> >             </fileset>
> >             
> >             <fileset dir="${src}">
> >                     <include name="**/*.class"/>
> >             </fileset>
> >     </path>
> >     
> >     <property name="cp" refid="enhance.cp"/>
> >     <property name="src" value="${basedir}${file.separator}src"/>
> >     <property name="bin" value="${basedir}${file.separator}bin"/>
> > 
> >     
> >     <target name="enhance">
> >             <echo message="${cp}"/>
> >             <taskdef name="openjpac"
> classname="org.apache.openjpa.ant.PCEnhancerTask">
> >                     <classpath refid="enhance.cp"/>
> >             </taskdef>
> >             <openjpac>
> >                     <classpath refid="enhance.cp"/>
> >                     <config 
> > propertiesFile="./src/META-INF/persistence.xml"/>
> >                 <fileset dir="${src}">
> >                   <include name="**/entities/*.java" />
> >                 </fileset>
> >             </openjpac>
> >     </target>
> > </project>
> > 
> > The build runs without any problems and with setting openjpa.Log = TRACE
> it seems that all classes are enhanced. But if I run my application, I
> still get the message:
> > 
> > Creating subclass for "[...]". This means that your application will be
> less efficient and will consume more memory than it would if you ran the
> OpenJPA enhancer. Additionally, lazy loading will not be available for
> one-to-one and many-to-one persistent attributes in types using field access;
> they will be loaded eagerly instead.
> > 
> > Any ideas?
> > Can it be that Eclipse is somehow overwriting my enhanced classes on
> startup? 

-- 
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss 
für nur 17,95 Euro/mtl.!* 
http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a

Reply via email to