Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipselink 2.4 migration to openJPA (WebSphere 8.5.5 javax.persistence)(Problems migrating from EclipseLink 2.4 to openJPA WS 8.5.5)
Eclipselink 2.4 migration to openJPA (WebSphere 8.5.5 javax.persistence) [message #1078011] Fri, 02 August 2013 12:23 Go to next message
Paolo Berardo is currently offline Paolo BerardoFriend
Messages: 3
Registered: August 2013
Junior Member
EclipseLink is not fully J2EE compliant (it's for J2SE, i know...).
We use eclipselink to create the core of our application.
The EclipseLink Javax.persistence.jar is different from WebSphere 8.5.5 javax.persistence.
So, when we put out javax.persistence of eclipselink and want to use a javax.persistence j2ee full compliant (as websphere javax.persistence is) we have serious problem of data conversion, problems to resolve relationship between entities, etc.

How can we resolve this problem?
Is there some software that can help us to find where eclipselink implementation doesn't follow J2EE rules (jsr-317) so we can make punctual modification on the source code?
Is there a guide on this argument (EclipseLink to openJPA migration)?
If someone have info about it, please tell us.

Thanks in advance, have a nice day.
Re: Eclipselink 2.4 migration to openJPA (WebSphere 8.5.5 javax.persistence) [message #1078038 is a reply to message #1078011] Fri, 02 August 2013 13:05 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
I'm afraid I don't understand what you mean. EclipseLink is the reference implementation for JPA, so it is fully J2EE compliant as far as I'm aware. As for jars - the javax.persistence.jar is just the JPA javax.persistence classes and while EclipseLink ships with a jar, the ones shiped with your app server can be used instead. The only potential problem might be with the version of the persistence.jar used in the server. Check if it supports JPA 1.0 or 2.0 - if it is only 1.0 then your JPA application will only be able to use JPA 1.0 interfaces and classes. EclipseLink will work on both versions of the jar.

If you are using EclipseLink for your application, why would you not continue to use EclipseLink in your server?


Best Regards,
Chris
Re: Eclipselink 2.4 migration to openJPA (WebSphere 8.5.5 javax.persistence) [message #1078060 is a reply to message #1078038] Fri, 02 August 2013 13:37 Go to previous messageGo to next message
Paolo Berardo is currently offline Paolo BerardoFriend
Messages: 3
Registered: August 2013
Junior Member
I want to continue to use EclipseLink, because it has beautiful and usefull features, but we run the EAR on IBM WebSphere 8.5.5 and the Application Server Administrator tell us to use websphere javax.persistence to be fully compliant (we thought that EclipseLink, because it's the reference implementation of JPA, was J2EE fully compliant...).
Oracle in this mapping (watch this link --> docs.oracle.com/cd/E13222_01/wls/docs81/jdbc_drivers/oracle.html#1067028) change our datatype so we have 60% of our entities to modify and to adapt the source code builded on them. Do you have any suggestion about it?
Re: Eclipselink 2.4 migration to openJPA (WebSphere 8.5.5 javax.persistence) [message #1078111 is a reply to message #1078060] Fri, 02 August 2013 14:55 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
EclipseLink is fully compliant. What he might mean is to not include the persistence.jar that is downloaded with EclipseLink in your Ear since it already exists on the server. That, or he means use the JPA provider that ships with WebSphere; this is an option if you use strictly JPA, but J2EE compliant servers allow using different providers since that is the point of the spec. You should be able to set up EclipseLink as a shared library or even place the EclipseLink jars in the ear so it can be used by your application.

The link you sent sends me to a WebLogic JDBC driver page and has nothing to do with JPA entities. In theory, you should not have to change any of your mappings when switching to WebSphere, databases or even JPA providers - though in practice there are always a few things that need to be tweaked as apps rely on specific behavior. Can you give a specific example of what is causing you problems, and if you are able to use EclipseLink in WebSphere?

Have you seen the tutorial at http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebSphere_Web_Tutorial

Best Regards,
Chris

Re: Eclipselink 2.4 migration to openJPA (WebSphere 8.5.5 javax.persistence) [message #1078170 is a reply to message #1078111] Fri, 02 August 2013 16:22 Go to previous messageGo to next message
Paolo Berardo is currently offline Paolo BerardoFriend
Messages: 3
Registered: August 2013
Junior Member
Hello, thanks for the info. I have read the tutorial.
2 years ago we had Websphere 7 as application server and because there isn't an implementation bounded into WebSphere of JPA 2.0, we put EclipseLink on the project.
All run smooth and fast.
Now the manager want to use Websphere 8.5.5 for security reason. So JPA 2.0 is native on Websphere and we have the problem of EclipseLink incompatibility.
The part of source code causing us problems are (for example) the mapping of BigInteger and Character (1 byte) into the beans. With EclipseLink and his persistence all go well, with websphere persistence provider it gives us errors (he espected BigDecimal and Integer) so in the conversion the code give us runtime exceptions... Also we have a big problem: we manage the EntityManager from the application (open-close connection, etc.). So when we ask from an entity a fetch_type lazy data, it found entity manager closed and return null.

Sorry for this long post, but with it, I try to explain our problems so maybe all together we can find a solution.

Thanks in advance, have a nice day.
Re: Eclipselink 2.4 migration to openJPA (WebSphere 8.5.5 javax.persistence) [message #1080858 is a reply to message #1078170] Tue, 06 August 2013 13:09 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
I don't know why those mappings wouldn't work in a different provider if they are standard JPA type mappings - you will probably have to post specifics about the mappings on a site specific to the WebSphere provider, or with WebSphere.

EclipseLink though can be used in WebSphere as the JPA provider for your application. There is no need to switch providers if EclipseLink is working for your application should you change servers.
Previous Topic:Native query on MongoDB don't work with find
Next Topic:jpa2.1 join on Criteria API
Goto Forum:
  


Current Time: Fri Mar 29 08:40:11 GMT 2024

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

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

Back to the top