问题
The software we work on is fully on OSGi. So we need JPA implementation which can WELL work with OSGI. Currently we use eclipselink (2.6.3)+eclipse gemini. The problem is that according to specs (jpa or osgi-ee ?) entities are not supported to be in different bundles. However, the developer of gemini said that he also doesn't understand this issue with specs and finds it strange that's why he allowed using entities from different bundles, although no special work was done.
So eclipselink somehow works with osgi. However, we came across the following problem. We have two entities: ClassA and ClassB. ClassA extends ClassB. ClassA is in one bundle, ClassB in in another bundle. We need EntityGraph (FetchGroup). EclipseLink needs weaving for FetchGroup. However, we couldn't make weaving (static and dynamic) work with our situation (it doesn't support classes be in different bundles).
So the question - can OpenJPA do what we need: entity graph + osgi support of entities?
来源:https://stackoverflow.com/questions/37727756/does-openjpa-work-with-osgi