JPA 2.0 on WebLogic Server 10.3.6

I need to use JPA 2.0 (with EclipseLink implementation). The problem is that I also need to deploy this application on a WebLogic 10.3.6 server that implements the Java EE 5 specification and therefore does not require JPA 2 support.

I know that there are patches that can be used to add support for JPA 2.0 in this version , but the system administrator does not want to change anything at all on the server

I tried adding the javax.persistence-2.1.0.jar file to my war, believing that my application would use this file, and not the one provided by WebLogic. Does that make sense? Is there any way to achieve this without having to contact the server?

+3
java-ee jpa eclipselink weblogic
source share
1 answer

It is not supported in earlier versions, but in 10.3.6 you should be able to use your own libraries for JPA2. If you use cool names, you can override the loading of the weblogic class chain and where weblogic usually loads JPA, then it will use your library that supports JPA-2.0 instead.

At the top of my head, the cool names to redefine are org.eclipse.persistence. * and javax.persistence. *

(Note that this will not work on anything below 10.3.5 if anyone else tries this).

+2
source share

All Articles