openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: PCEnhancement
Date Fri, 13 Aug 2010 21:32:01 GMT
You can use javap to determine whether the entity have been enhanced. If the
entity class implements PersistenceCapable the enhancer has done its stuff.

An example from our build
$ javap org.apache.openjpa.meta.Person
Compiled from "Person.java"
public class org.apache.openjpa.meta.Person extends java.lang.Object
implements java.io.Serializable,*
org.apache.openjpa.enhance.PersistenceCapable*{
. . .

Based on Kevin's email I'd say that the app should be restarted
automatically though - but maybe this will help you make progress in the
mean time.

-mike

On Fri, Aug 13, 2010 at 11:45 AM, Arnav-A <arnav216@gmail.com> wrote:

>
> Thanks a lot for the respnse.
>
> Let me answer all the questions
>
> 1. Do you have a PMR open yet?
> => No. I have not created any PMR for this problem.
>
> 2. Have you tried stopping and restarting the application?
> => Yes. In that case, it works fine. Either I restart the application after
> cleanup OR remove and add application to server, it works fine.
>
> 3. So, does your environment have the automatic publish action turned on or
> off?
> => Yes. I have automatic publish action turned on.
>
> In the mean time, I was looking at the option for build time entity
> enhancement mentioned in the link
>
> http://openjpa.apache.org/enhancement-with-eclipse.html?wwparam=1281713678
>
> As per the article details, I created my enhance.xml that contaiins
> following code.
>
> <project name="MFDataModelJPA">
>
>  <target name="enhance">
>  <taskdef name="openjpac"
> classname="org.apache.openjpa.ant.PCEnhancerTask">
>        <classpath>
>                <fileset
>
> dir="C:\Workspace\MaskFinanceOnlineSystemIntegrated\MFDataModelJPA\jpa_lib">
>                        <include name="com.ibm.ws.jpa.jar"/>
>                </fileset>
>        </classpath>
>  </taskdef>
>  <openjpac>
>        <classpath>
>                <fileset
> dir="C:\Workspace\MaskFinanceOnlineSystemIntegrated\MFDataModelJPA\src">
>                        <include name="com.ibm.ws.jpa.jar"/>
>                </fileset>
>        </classpath>
>  </openjpac>
>  </target>
> </project>
>
> In the configuration, I copied com.ibm.ws.jpa.jar to my jpa_lib folder and
> it has PCEnhancerTask Class.
> "src" is the folder name inside which I have all the entity classes in
> appropriate packages.
>
> I set the enhance.xml in the builder and clean the JPA project. It says
> "Build Successful", but not sure if the clasees have been enhanced.
>
> Is there a way we can find out if the classes has been enhanced? If we find
> that entities are for sure being enhanced, it might be the server that is
> not taking these enhanced classes for deployment.
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/PCEnhancement-tp5416877p5420700.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message