users@glassfish.java.net

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

From: Phillip Ross <phillip.ross_at_yahoo.com>
Date: Mon, 18 May 2009 16:02:58 -0700 (PDT)

Actually I should mention one other thing with regards to my experiences. I actually use Atomikos Transaction Essentials outside of the container and do out-of-the-container testing of the same code. This is done with a session customizer and EclipseLink transaction controller implementation that I wrote so that I can continue to use JTA transactions with the persistence.xml. Transaction propagation between SLSB components works fine outside the container and Toplink 1.1.x works fine in that case, it's only when running inside the container that I what Im assuming is a tx propagation problem between SLSBs and Persistence Contexts :(

Thanks
- Phillip



----- Original Message ----
> From: Phillip Ross <phillip.ross_at_yahoo.com>
> To: users_at_glassfish.dev.java.net
> Cc: Tom Ware <tom.ware_at_oracle.com>
> Sent: Monday, May 18, 2009 6:52:56 PM
> Subject: Re: EclipseLink 1.1.1 in GlassFish v2ur2 does never INSERT anything...!
>
>
> Also, you might want to try using EclipseLink 1.0.2 just as another datapoint.
>
> I'd been working with several apps using GFv2 and switched from toplink to
> eclipselink by simply naming the eclipselink provider in the persistence.xml and
> placing the eclipselink jar in the domain lib directory. Everything worked
> fine... until I tried upgrading to Eclipselink 1.1x.
> At that point I began running into problems with transactions. I've not had the
> chance to work up a reproducable case, but basically a servlet calling an SLSB
> that uses an injected entity manager works OK... but a servlet calling an SLSB
> that calls another SLSB that uses the entity manager... has odd problems kind of
> like what you are describing.
>
> Until I get the time to narrow down the problem, I'm stuck with 1.0.2, though I
> havent tried what Marina was suggesting yet. I will also give that a shot and
> see if it helps with the 1.1.x problems.
>
> Sorry I can't be much help, but I'd be interested to see if you could downgrade
> to eclipselink 1.0.2 and see if you get any different results.
>
> Thanks!
> - Phillip
>
>
>
> ----- Original Message ----
> > From: Marina Vatkina
> > To: users_at_glassfish.dev.java.net
> > Cc: Tom Ware
> > Sent: Monday, May 18, 2009 6:28:44 PM
> > Subject: Re: EclipseLink 1.1.1 in GlassFish v2ur2 does never INSERT
> anything...!
> >
> > Hi Markus,
> >
> > 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