You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by it...@daimler.com on 2009/04/16 16:38:31 UTC

Eclipse Plugin for openJPA -> Enhancement incorrect

Hello,

I'm currently trying to use the Eclipse Plugin provided at 
http://people.apache.org/~ppoddar/eclipse.
Unfortunately, this uses the new 2.0 SNAPSHOT with seems to have some 
issues in enhancing the persistent classes. Only primitive types are 
enhanced at all. All @OneToOne or @OneToMany Relationships are completely 
ignored. 

In case I do the enhancement by myself using the PCEnhancer, the files are 
correctly enhanced, so I'm unsure what the Plugin is doing differently. 

Here is an example of what the Plugin does (decompiled)

<raw>
public void setBranche(Branche branche) {
    this.branche = branche;
  }

  public Branche getBranche() {
    return this.branche;
  }
</raw>

and what the PCEnhancer does correctly:

<raw>
 public void setBranche(Branche branche) {
    pcSetbranche(this, branche);
  }

  public Branche getBranche() {
    return pcGetbranche(this);
  }
</raw>

Any suggestions in this direction?

Thanks,

Heiko

PS: Does anybody know a good Howto on setting up openJPA 1.2 or the 
nightly build of 2.0 on a Websphere 6.1 + EJB3 FP? It's really a pain to 
circumvent the existing openJPA 1.0.4-SNAPSHOP in there. I've tried a lot 
and I can't manage to make IBM's code NOT interfere with my own JPA 
implementation. 

--
Dr.-Ing. Heiko Kopp / Fa. GFI - iT media Consult GmbH
c/o Mercedes-Benz Bank
HPC 032 - ITF/FS-DPS
70469 Stuttgart

Tel.: 0711 2574-6144
Fax: 0711 2574-96144
E-Mail: it-media.kopp@daimler.com

If you are not the intended addressee, please inform us immediately that you have received this e-mail in error, and delete it. We thank you for your cooperation.  

Re: Eclipse Plugin for openJPA -> Enhancement incorrect

Posted by Kevin Sutter <kw...@gmail.com>.
Hi,
I'll let Pinaki post on the eclipse plugin questions, but I'll take a shot
at the alternate JPA provider question...

On Thu, Apr 16, 2009 at 9:38 AM, <it...@daimler.com> wrote:

>
> PS: Does anybody know a good Howto on setting up openJPA 1.2 or the
> nightly build of 2.0 on a Websphere 6.1 + EJB3 FP? It's really a pain to
> circumvent the existing openJPA 1.0.4-SNAPSHOP in there. I've tried a lot
> and I can't manage to make IBM's code NOT interfere with my own JPA
> implementation.
>

First off, attempting to use OpenJPA 2.0.x in a WAS v6.1 with EJB3 FeP will
be difficult.  The EJB3 FeP environment is assuming the JPA 1.0 API and
XSD's are available and in use.  Although the JPA 2.0 API is compatible with
JPA 1.0, there are dependencies on the original API that make this
combination difficult.  I would avoid that combination, at least for the
time being...

Installing OpenJPA 1.2.x (which is shipped with WAS v7) as a shared library
in the EJB3 FeP environment should be more straight forward.  The
instructions for configuring alternate JPA providers are documented in the
InfoCenter [1].  Please start with these instructions and then let's go from
there.

Thanks,
Kevin

[1]
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.ejbfep.multiplatform.doc/info/ae/ae/tejb_configpp.html

>
> --
> Dr.-Ing. Heiko Kopp / Fa. GFI - iT media Consult GmbH
> c/o Mercedes-Benz Bank
> HPC 032 - ITF/FS-DPS
> 70469 Stuttgart
>
> Tel.: 0711 2574-6144
> Fax: 0711 2574-96144
> E-Mail: it-media.kopp@daimler.com
>
> If you are not the intended addressee, please inform us immediately that
> you have received this e-mail in error, and delete it. We thank you for your
> cooperation.

Re: Eclipse Plugin for openJPA -> Enhancement incorrect

Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
  The plug-in merely invokes enhancer on classes as part of incremental or batch compilation phase of Eclipse. Does the result vary if the project is cleaned and rebuilt? (just trying to find out whether the error is introduced by incremental compilation). 

  Few other people had reported using the plug-in. But they had not reported such error. That is why I am wondering if enhancement is broken so badly as you have reported then whether their dev project could have worked at all. 

My current bandwidth is pretty overloaded to probe it in near future, but if someone can verify this reported erroneous behavior will be really helpful. 

  At the time of writing the plug-in, I had pondered over the decision to package a fixed version of OpenJPA libraries with the plugin itself. A more flexible scenario should allow the user to chose an option of using the plug-in with a OpenJPA version different than what the plug-in contains. But given that the plugin was my first ever (novice) attempt to understand how Eclipse plug-in framework works and also to ease the enhancement process -- I have postponed that possibility.  


Hello,

I'm currently trying to use the Eclipse Plugin provided at 
http://people.apache.org/~ppoddar/eclipse.
Unfortunately, this uses the new 2.0 SNAPSHOT with seems to have some 
issues in enhancing the persistent classes. Only primitive types are 
enhanced at all. All @OneToOne or @OneToMany Relationships are completely 
ignored. 

In case I do the enhancement by myself using the PCEnhancer, the files are 
correctly enhanced, so I'm unsure what the Plugin is doing differently. 

Here is an example of what the Plugin does (decompiled)


public void setBranche(Branche branche) {
    this.branche = branche;
  }

  public Branche getBranche() {
    return this.branche;
  }


and what the PCEnhancer does correctly:


 public void setBranche(Branche branche) {
    pcSetbranche(this, branche);
  }

  public Branche getBranche() {
    return pcGetbranche(this);
  }


Any suggestions in this direction?

Thanks,

Heiko

PS: Does anybody know a good Howto on setting up openJPA 1.2 or the 
nightly build of 2.0 on a Websphere 6.1 + EJB3 FP? It's really a pain to 
circumvent the existing openJPA 1.0.4-SNAPSHOP in there. I've tried a lot 
and I can't manage to make IBM's code NOT interfere with my own JPA 
implementation. 

--
Dr.-Ing. Heiko Kopp / Fa. GFI - iT media Consult GmbH
c/o Mercedes-Benz Bank
HPC 032 - ITF/FS-DPS
70469 Stuttgart

Tel.: 0711 2574-6144
Fax: 0711 2574-96144
E-Mail: it-media.kopp@daimler.com

If you are not the intended addressee, please inform us immediately that you have received this e-mail in error, and delete it. We thank you for your cooperation.  



-----
Pinaki Poddar                      http://ppoddar.blogspot.com/
                                      
http://www.linkedin.com/in/pinakipoddar
OpenJPA PMC Member/Committer
JPA Expert Group Member
-- 
View this message in context: http://n2.nabble.com/Looking-for-advice-on-JPA-based-DAO-tp2641707p2651445.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.