[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] [OSGI] Using entity manager factory with entities discovered at runtime in an other bundle


I have built an OSGI bundle which can read and write annotated entities to a
database inspired by the "OSGi Proof of Concept". Unfortunately, I can't find
a satisfactory solution for my problem. I would like to use this bundle to
persist entities defined in other bundles. These bundles may be considered as
"plugins" of the first bundle, which is started at first. Plugins may be
numerous, I cannot open as many database connections.

My problem, is that in OSGI, without taking into account the problems of
dependency, it seems that the entities must be defined in the persistence.xml
and cannot be discovered at runtime when plugins register to the first bundle.
And so the first bundle cannot persist entities from plugins.

To use the factory, I thought the use of a OSGI service from the first bundle.