I am wondering how to create an EntityManager in every Bundle. Or how to use JPA in OSGi.
In fact, I have one main package that loads the persistence.xml file and creates an EntityManager instance. After that, my main package gives an instance of the Entity manager to other packages through services. Therefore, I use the capabilities of the equinox services, and I am sure that there must be one more solution for getting the EntityManager in each bundle!
Do you know another solution? or the right way to achieve this?
jpa eclipselink persistence osgi
user376112
source share