users@glassfish.java.net

Re: Re: EclipseLink 1.1.1 in GlassFish v2ur2 does never INSERT anything...!

From: Phillip Ross <phillip.ross_at_yahoo.com>
Date: Tue, 19 May 2009 20:16:59 -0700 (PDT)

I tried placing the target-server property in the persistence.xml as Marina suggested but unfortunately that didnt solve the problem I experience :(

I do know that I dont need any property explicitly with eclipselink v1.0.2 which is currently my environment where everything works. I just need to have the eclipselink.jar in the domain lib dir, specify the provider class in the persistence.xml and everything just works.

- Phillip



----- Original Message ----
> From: Markus Karg <karg_at_quipsy.de>
> To: users_at_glassfish.dev.java.net
> Cc: Tom Ware <tom.ware_at_oracle.com>
> Sent: Tuesday, May 19, 2009 6:05:57 AM
> Subject: RE: Re: EclipseLink 1.1.1 in GlassFish v2ur2 does never INSERT anything...!
>
> Marina,
>
> thank you for that tip. Yes this solves the problem. Actually I thought
> JPA is a standard interface so there is no need for vendor specific
> tweaks to be done. Strange.
>
> I updated the WIKI to reflect this essential detail (and some other
> more):
>
> http://wiki.glassfish.java.net/Wiki.jsp?page=FaqEclipseLinkGlassFishV2
>
> Thanks
> Markus
>
> > -----Original Message-----
> > You might also need to set property "eclipselink.target-server" to
> > "SunAS9" if
> > that version of GF doesn't have EclipseLink integration.
> > Regards,
> > -marina
> >
> > Markus Karg wrote:
> > > My application works well on GlassFish v2ur2 using the contained
> > TopLink
> > > product.
> > >
> > >
> > >
> > > Now I switched from TopLink to EclipseLink 1.1.1 by putting
> > > eclipselink.jar into domain1/lib, and setting the provider and
> > platform
> > > explicitly in persistence.xml of my EJB-JAR module inside of my EAR
> > module:
> > >
> > >
> > >
> > >
> > >
> > >
> > org.eclipse.persistence.jpa.PersistenceProvider
> > >
> > > jdbc/YYY
> > >
> > >
> > >
> > >
> > >
> value="org.eclipse.persistence.platform.database.SQLAnywherePlatform"
> > />
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > I can still read all data, but newly created data is never found in
> > the
> > > database. Inspecting the LOG discovers that EclipseLink never did
> > > execute any InsertObjectQuery, so it did never INSERT the data into
> > the
> > > database, but it DID recognize that the PERSIST operation was called
> > > ("PERSIST operation called" is in the log, but no "Execute query
> > > InsertObjectQuery" is found).
> > >
> > >
> > >
> > > This is really weird! If I do the same inside of a standalone Java
> SE
> > > sample with the same database, driver and eclipselink version, it is
> > > working pretty well! So it must be caused by the relation to the
> > > GlassFish v2ur2 container.
> > >
> > >
> > >
> > > If I remove the em.getTransaction().commit() from the Java SE
> sample,
> > > then it is exactly the same log result as the server log shows. So I
> > > expect that GlassFish is not closing the transaction OR the
> > persistence
> > > provider does not recognize that. This would explain, why there is
> no
> > > "commit transaction" found in the server.log at all!
> > >
> > >
> > >
> > > Since my application solely uses container managed transaction and
> > NEVER
> > > uses the transaction API directly, I suppose this to be a bug either
> > in
> > > GlassFish v2ur2 or in EclipseLink 1.1.1 (or in the description how
> to
> > > integrate it).
> > >
> > >
> > >
> > > Can anybody explain why this happens, and what to do against it? I
> am
> > > really desperate!
> > >
> > >
> > >
> > > Thanks
> > >
> > > Markus
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net