Hi!
I wonder about a good way to have an EntityManager in each Bundle. Or how to use correctly JPA in an OSGi program.
Actually, I've one main bundle that loads the persistence.xml file and instanciates the EntityManager. After, my main bundle gives the instance of Entity manager to the other bundles via the services. So I use the power of the services of equinox and I'm sure it must exist an another solution to obtain an EntityManager in each bundle!
Do you know an another solution? or a correct way to achieve this?
Thanks for your attention,
Bat