Community
Participate
Working Groups
According to the OSGI JPA Specs, it's not required to support persistence units distributed across multiple bundles. This means all your domain classes need to be located in the same bundle. IMHO this is not realistic. F.i. I have some Money class used as a value type. It's stored in a separate "model.core" bundle because it's used in several persistence bundles (like "model.accounting" and "model.reporting") that import the Money class. In the current OSGi JPA spec this would not be allowed because the Money class is not defined in the persistence bundle itself. So I would need a separate Money class for each persistence bundle. (Money1.class in the persistence bundle "model.accounting" and Money2.class in the persistence bundle "model.reporting). I don't see any enterprise level OSGi project using JPA being developed with this limitation. It would be nice if gemini jpa would allow spreading the model across several bundles and using the OSGi class loading mechanism to access them.
I have a similar use-case. I'm writing an extension for a server bundle and want to create new entities in the extension bundle, which will be added on start.
Are there any news about that issue?
If using entities from fragment bundles works for you, there is bug #335698 about that, and until it is resolved there is a workaround here: http://www.eclipse.org/forums/index.php/mv/msg/365382/895890/#msg_895890
I would also vote for this :-) Fragments does not help in any way, then you do not have to copy them to the bundle but to the fragment...
I have the same problem. Voted.