Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipselink 2.5 on Glassfish 3.1.2.2 possible without JavaEE7?
Eclipselink 2.5 on Glassfish 3.1.2.2 possible without JavaEE7? [message #1083094] Fri, 09 August 2013 13:06 Go to next message
Neikius Mising name is currently offline Neikius Mising name
Messages: 43
Registered: April 2011
Member
I updated my Glassfish 3.1.2.2 with OSGI packets from eclipselink 2.5, now I notice there is a "slight" problem: I tried using EntityManager.createStoredProcedureQuery and apparently that one is abstract.
com.sun.enterprise.container.common.impl.EntityManagerWrapper.createStoredProcedureQuery(Ljava/lang/String;)Ljavax/persistence/StoredProcedureQuery;


I guess this is since I've included persistence-2.1 api jar. So where would be the implementation for this class? I guess it is somewhere in javaee7 impl, but is it in any of the eclipselink 2.5 jars too? Maybe I just forgot to add a specific one...

I guess the same procedure as was for updating eclipselink until 2.4.2 doesn't work anymore?
Re: Eclipselink 2.5 on Glassfish 3.1.2.2 possible without JavaEE7? [message #1083251 is a reply to message #1083094] Fri, 09 August 2013 17:53 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1034
Registered: July 2009
Senior Member
If you are going to use JPA 2.1, you cannot use a container managed persistence context unless the container also supports JPA 2.1. So you can still update EclipseLink, just not the JPA 2.1 persistence.jar; you will be limited to JPA 2.0 methods on the container managed EM. You can unwrap the container EM to get at the EclipseLink EntityManagerImpl in order to call createStoredProcedureQuery on it directly though. You might be able to include the JPA 2.1 persistence.jar as a shared library and then use a locally managed persistence unit, avoiding Glassfish's JPA wrappers, but I do not know how this is supported.

The difference between container managed and application managed contexts is usually injection vs Persistence.createEntityManagerFactory() calls, which the application is responsible for closing.

Re: Eclipselink 2.5 on Glassfish 3.1.2.2 possible without JavaEE7? [message #1083903 is a reply to message #1083251] Sat, 10 August 2013 17:54 Go to previous message
Neikius Mising name is currently offline Neikius Mising name
Messages: 43
Registered: April 2011
Member
Makes sense. I am using container managed contexts and all that goes with that. Also jersery 2 in gf4 is totally incompatible with 1.x, so I guess I will keep it as is. I only need to call one procedure though and I've managed to convert it to a function that returns a string and I just call it select function(param) from dual Smile It works.

Thanks for the answer. Just one detail I am curious, there shouldn't be any problems using a newer version of eclipselink, besides not having any jpa 2.1 functionality?
Previous Topic:MOXy unmarshalling of nulls
Next Topic:@AdditionalCriteria breaks on @LOB updates
Goto Forum:
  


Current Time: Fri Oct 24 19:06:13 GMT 2014

Powered by FUDForum. Page generated in 0.03336 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software