|How can I use Hibernate, or OpenJPA with EclipseLink [message #376358]
||Wed, 16 July 2008 20:41
Registered: July 2009
I want to be able to plug in different JPA implementations in my|
application without a lot of reconfiguration and be able to continue
to use the advanced annotations and capabilities of EclipseLink.
My understanding is that EclipseLink, while it uses
TopLink as its default JPA implementation, sits on top of and
allows for plugability by simply dropping in a different persistence jar,
such as Hibernate.
However, the examples on the EclipseLink wiki indicate that all the
in persistence.xml have to be changed, and some (the EclipseLink-advanced
have to be removed altogether. The same holds for entity annotations. In
addition, the examples seem to indicate that the method for injecting an
EntityManager can vary depending on the JPA container.
If I want to use Hibernate with EclipseLink cache, I can't do it just by
dropping in the right jar files.
Is this correct? Any suggestions would be appreciated.
|Re: How can I use Hibernate, or OpenJPA with EclipseLink [message #376363 is a reply to message #376358]
||Thu, 17 July 2008 12:43
Originally posted by: luxspes.yahoo.com|
I am sorry to inform you that what you want is impossible, you can not use
EclipseLink and then Hibernate as the internal implementation of
EclipseLink, EcliseLink and Hiberante are both internal implementations of
JPA. Trying to use Hibernate as the internal implementation of EclipseLink
would be like trying to use Oracle as the internal implementation of
SqlServer (it just doesn't make sense)
In other words EclipseLink doesn't it use
TopLink as its default JPA implementation, EclipseLink is the new name for
the OpenSource version of TopLink. The "generic" part is precisely
javax.persistence_1.0.0.jar, and the specific pluggable (replaceble part)
is eclipselink.jar (or if you want to use Hibernate, then
hibernate-core.jar, hibernate-entitymanager.jar and
And therefore you cannot use Hibernate with EclipseLink cache.
Powered by FUDForum
. Page generated in 0.01974 seconds