Which JPA providers are supported by Apache Aries Managed JPA?

OpenJPA, obviously. I also saw references to EclipseLink and Hibernate, but is there a significant difference in capabilities?

+2
source share
2 answers

Most of the differences are due to how OSGi-aware the provider is. For example, you may need to wrap Hibernate banners as OSGi packages yourself (or use a set that someone else has already wrapped - there are several floating ones on the Internet).

Sometimes providers try and do class loading in such a way that they will not work in the OSGi environment, so this is what you need to look for if you are completing your own or using off-track functions of the main supported providers,

You also need to make sure that the provider is registered as an OSGi service. It just works with OpenJPA, and there is an EclipseLink adapter in the Aries code base. I assume that sharing Hibernate, which people have shared, also does this. There are instructions on how to do this for other vendors (notably DataNucleus) in this thread:

http://www.mail-archive.com/ aries-user@incubator.apache.org /msg00251.html

+3
source

I really tested the suppliers, so I am not giving you a theoretical answer.

For Aries JPA version 1.0.0

  • OpenJPA Work
  • Hibernate does not work.
  • EclipseLink did not try

Hibernation does not work due to a problem registered here: https://issues.apache.org/jira/browse/ARIES-978

Basically, deployment is not performed due to lack of package context. I think it would be safe to assume that Aries supports OpenJPA until they include Hibernate and EclipseLink in their regression tests / samples. I will watch when / if this happens.

+1
source

Source: https://habr.com/ru/post/1444839/


All Articles