You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Sreedhar.sirigiri" <sr...@gmail.com> on 2007/07/09 14:12:01 UTC

What other Enhancers can I use !!

Hi All,

While building the project I'm using the following script in build.xml to
Enhance the classes. Is there any way I can use other enhancer class instead
of PCEnchancerTask? If yes, can anyone provide the details. 

<target name="enhance">
	  <!-- define the openjpac task; this can be done at the top of the    -->
	  <!-- build.xml file, so it will be available for all targets     
org.apache.openjpa.ant.PCEnhancerTask-->
	  <taskdef name="openjpac" classpathref="enh.classpath"
classname="org.apache.openjpa.ant.PCEnhancerTask"/>
	  <!-- invoke enhancer on all .java files below the model directory -->
	<openjpac>
		<config propertiesFile="./dd/openjpa/persistence.xml"/>
		<!-- <classpath><pathelement location="${build.dir}" /></classpath>  -->
		<classpath refid="enh.classpath" />
	    <fileset dir=".">
		  <include name="src/com/vormetric/server/dao/user/*DTO.java" /> 
	    </fileset> 
	    <fileset dir="${build.dir}">
	  	  <include name="PrivilegeDTO.class" />
 	  	  <include name="LoggerConfigDTO.class" />
	    </fileset>
	</openjpac>
</target>

Regards,
Sreedhar
-- 
View this message in context: http://www.nabble.com/What-other-Enhancers-can-I-use-%21%21-tf4048660.html#a11499932
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: Can I use JPA PCEnhancer !!

Posted by Michael Dick <mi...@gmail.com>.
I'm not sure I understand the question. If you're asking whether you can use
another vendor's enhancer instead of OpenJPA's enhancer the answer is no.

The enhancement processing is not covered in the JPA specification and is
vendor specific, and OpenJPA will not work unless you have enhanced your
entities.

I believe you can use other enhancers in addition to the OpenJPA enhancer.
For example you could enhance your entities through the OpenJPA PCEnhancer
and then enhance them with another tool or use the javaagent mechanism to do
runtime bytecode insertion if you desire. Depending on which third party
enhancer you use there is the potential for collisions, but in most cases a
third-party enhancer will work fine.

Hope this helps,
Mike

On 7/9/07, Sreedhar.sirigiri <sr...@gmail.com> wrote:
>
>
> I meant any other PCEnhancer not JPA enhancer. Sorry for that.
>
> Sreedhar
>
>
>
> Jacek Laskowski-4 wrote:
> >
> > On 7/9/07, Sreedhar.sirigiri <sr...@gmail.com> wrote:
> >
> >> While building the project I'm using the following script in build.xmlto
> >> Enhance the classes. Is there any way I can use JPA enhancer class
> >> instead
> >> of openJPA enchancer? If yes, can anyone provide the details.
> >
> > Is there any? Where did you find JPA enhancer class?
> >
> > You can enhance your entities at build time and runtime. How it's done
> > depends on the JPA provider you use. OpenJPA comes with PCEnhancer
> > that does the job at build time. If you've found JPA enhancer it
> > likely belongs to another jpa provider.
> >
> > BTW, the question should go to the user mailing list
> > (users@openjpa.apache.org)
> >
> > Jacek
> >
> > --
> > Jacek Laskowski
> > http://www.JacekLaskowski.pl
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/What-other-Enhancers-can-I-use-%21%21-tf4048660.html#a11500561
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>
>

Re: Can I use JPA PCEnhancer !!

Posted by Michael Dick <mi...@gmail.com>.
I'm not sure I understand the question. If you're asking whether you can use
another vendor's enhancer instead of OpenJPA's enhancer the answer is no.

The enhancement processing is not covered in the JPA specification and is
vendor specific, and OpenJPA will not work unless you have enhanced your
entities.

I believe you can use other enhancers in addition to the OpenJPA enhancer.
For example you could enhance your entities through the OpenJPA PCEnhancer
and then enhance them with another tool or use the javaagent mechanism to do
runtime bytecode insertion if you desire. Depending on which third party
enhancer you use there is the potential for collisions, but in most cases a
third-party enhancer will work fine.

Hope this helps,
Mike

On 7/9/07, Sreedhar.sirigiri <sr...@gmail.com> wrote:
>
>
> I meant any other PCEnhancer not JPA enhancer. Sorry for that.
>
> Sreedhar
>
>
>
> Jacek Laskowski-4 wrote:
> >
> > On 7/9/07, Sreedhar.sirigiri <sr...@gmail.com> wrote:
> >
> >> While building the project I'm using the following script in build.xmlto
> >> Enhance the classes. Is there any way I can use JPA enhancer class
> >> instead
> >> of openJPA enchancer? If yes, can anyone provide the details.
> >
> > Is there any? Where did you find JPA enhancer class?
> >
> > You can enhance your entities at build time and runtime. How it's done
> > depends on the JPA provider you use. OpenJPA comes with PCEnhancer
> > that does the job at build time. If you've found JPA enhancer it
> > likely belongs to another jpa provider.
> >
> > BTW, the question should go to the user mailing list
> > (users@openjpa.apache.org)
> >
> > Jacek
> >
> > --
> > Jacek Laskowski
> > http://www.JacekLaskowski.pl
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/What-other-Enhancers-can-I-use-%21%21-tf4048660.html#a11500561
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>
>

Re: Can I use JPA PCEnhancer !!

Posted by "Sreedhar.sirigiri" <sr...@gmail.com>.
I meant any other PCEnhancer not JPA enhancer. Sorry for that.

Sreedhar



Jacek Laskowski-4 wrote:
> 
> On 7/9/07, Sreedhar.sirigiri <sr...@gmail.com> wrote:
> 
>> While building the project I'm using the following script in build.xml to
>> Enhance the classes. Is there any way I can use JPA enhancer class
>> instead
>> of openJPA enchancer? If yes, can anyone provide the details.
> 
> Is there any? Where did you find JPA enhancer class?
> 
> You can enhance your entities at build time and runtime. How it's done
> depends on the JPA provider you use. OpenJPA comes with PCEnhancer
> that does the job at build time. If you've found JPA enhancer it
> likely belongs to another jpa provider.
> 
> BTW, the question should go to the user mailing list
> (users@openjpa.apache.org)
> 
> Jacek
> 
> -- 
> Jacek Laskowski
> http://www.JacekLaskowski.pl
> 
> 

-- 
View this message in context: http://www.nabble.com/What-other-Enhancers-can-I-use-%21%21-tf4048660.html#a11500561
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: Can I use JPA PCEnhancer !!

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 7/9/07, Sreedhar.sirigiri <sr...@gmail.com> wrote:

> While building the project I'm using the following script in build.xml to
> Enhance the classes. Is there any way I can use JPA enhancer class instead
> of openJPA enchancer? If yes, can anyone provide the details.

Is there any? Where did you find JPA enhancer class?

You can enhance your entities at build time and runtime. How it's done
depends on the JPA provider you use. OpenJPA comes with PCEnhancer
that does the job at build time. If you've found JPA enhancer it
likely belongs to another jpa provider.

BTW, the question should go to the user mailing list (users@openjpa.apache.org)

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl