You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Marcux <wa...@mwvb.de> on 2011/02/17 21:11:02 UTC

OpenEJB + Eclipselink + PostgreSQL

hi

how can I use OpenEJB with Eclipselink
(org.eclipse.persistence.jpa.PersistenceProvider)? OpenEJB always uses the
OpenEJB JtaManager... thing and that uses the OpenJPA EntityManager (and
breaks my EJB 3.0 program). I've developed the program without OpenEJB,
using (the worst JPA 1.0 implementing) Eclipselink. Now I want to switch to
OpenEJB. I use DataSources and CMP.

Regards
Marcux

versions: OpenEJB 3.1.4 (OpenJPA 1.2.1 - why so old?), Eclipselink 1.1.2,
PostgreSQL 8.4, Windows Vista, Eclipse Galileo, Gradle 0.9.2.

-- 
View this message in context: http://openejb.979440.n4.nabble.com/OpenEJB-Eclipselink-PostgreSQL-tp3311540p3311540.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: OpenEJB + Eclipselink + PostgreSQL

Posted by Marcux <wa...@mwvb.de>.
hi Jon

Thanks for your reply.

I've tried that (of course). There's no error - even in OpenEJB log files
(mode=debug). OpenEJB just uses its own EntityManager. That one uses
internally the OpenJPA EntityManager.


Yesterday I found out that OpenJPA 1.2.x (in BMP mode) does not break my
program. Reading data from PostgreSQL is correct. The error could be with
OpenEJB (+CMP?) or DataSources. The problem is that entity fields have
trailing spaces - especially id fields - so data can not be loaded.

Today I'll try whether I can switch to Hibernate. Maybe that helps me to
switch to Eclipselink. And I want to find out where the trailing space
problem comes from.

Regards
Marcux
-- 
View this message in context: http://openejb.979440.n4.nabble.com/OpenEJB-Eclipselink-PostgreSQL-tp3311540p3314100.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: OpenEJB + Eclipselink + PostgreSQL

Posted by Jonathan Gallimore <jo...@gmail.com>.
Hi,

I haven't tried it myself, but I guess you should be able to add the 
Eclipselink jars either to the Tomcat/OpenEJB lib directory, or to your 
application and reference 
org.eclipse.persistence.jpa.PersistenceProvider in your persistence.xml 
- does that work? If it doesn't do you have an error or stacktrace that 
you can share?

Jon

On 17/02/2011 20:11, Marcux wrote:
> hi
>
> how can I use OpenEJB with Eclipselink
> (org.eclipse.persistence.jpa.PersistenceProvider)? OpenEJB always uses the
> OpenEJB JtaManager... thing and that uses the OpenJPA EntityManager (and
> breaks my EJB 3.0 program). I've developed the program without OpenEJB,
> using (the worst JPA 1.0 implementing) Eclipselink. Now I want to switch to
> OpenEJB. I use DataSources and CMP.
>
> Regards
> Marcux
>
> versions: OpenEJB 3.1.4 (OpenJPA 1.2.1 - why so old?), Eclipselink 1.1.2,
> PostgreSQL 8.4, Windows Vista, Eclipse Galileo, Gradle 0.9.2.
>