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).
jpa entitymanager?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:
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态