문제

OpenJPA, obviously. I've also seen EclipseLink and Hibernate mentioned, but is there significant difference in capabilities?

도움이 되었습니까?

해결책

Most differences come from how OSGi-aware the provider is. For example, you may need to wrap the Hibernate jars as OSGi bundles yourself (or use a set someone else has already wrapped - there are a few floating around on the web).

Occasionally providers try and do classloading in such a way that it won't work in an OSGi environment, so this is something to look out for if you wrap your own or use 'off-piste' features of the main supported providers.

You'll also need to make sure the provider registers itself as an OSGi service. This just works with OpenJPA, and there's an EclipseLink adapter in the Aries codebase. I assume the Hibernate bundles people have shared do this as well. There are instructions on how to do this for other providers (DataNucleus in particular) in this thread:

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

다른 팁

I have actually tested providers so I'm not giving you a theoretical answer.

For Aries JPA version 1.0.0

  • OpenJPA works
  • Hibernate does not work
  • EclipseLink have not tried

Hibernate does not work because of an issue logged here: https://issues.apache.org/jira/browse/ARIES-978

Basically deployment fails, because of a missing bundle context. I think it would be safe to assume Aries only supports OpenJPA until they include Hibernate and EclipseLink in their regression tests/samples. I'll be watching for when/if that happens.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top