Hi,
I am seeing a strange (wildly confusing) service registration when using the
Aries JPA Container with Equinox. Not sure where the problem is, so I figured I
start here.
When the DataSource and the PersistenceProvider are available the container
registers the EntityMangerFactory* services. However, the
EntityManagerFactoryBuilder Service shows up as being registered by the
container bundle while the EntityMangerFactory Services shows up as being
registered by the bundle that provides the persistence unit.
g! b 53
org.apache.aries.jpa.container_2.3.0 [53]
Id=53, Status=ACTIVE Data Root=...
"Registered Services"
{org.osgi.framework.hooks.weaving.WeavingHook}=...
{org.osgi.service.cm.ManagedService}=...
{org.osgi.service.jpa.EntityManagerFactoryBuilder}={osgi.unit.version=4.1.0.SNAPSHOT_20170104-2222,
osgi.unit.name=my.pu,
osgi.unit.provider=org.eclipse.persistence.jpa.PersistenceProvider,
service.id=119, service.bundleid=53, service.scope=singleton}
Services in use:
{javax.sql.DataSource}=...
{javax.persistence.spi.PersistenceProvider}=...
g! b 111
com.my.model_4.1.0.SNAPSHOT_20170104-2222 [111]
Id=111, Status=ACTIVE Data
Root=/Users/erwin/.../org.eclipse.osgi/111/data
"Registered Services"
{javax.persistence.EntityManagerFactory}={osgi.unit.version=4.1.0.SNAPSHOT_20170104-2222,
osgi.unit.name=my.pu,
osgi.unit.provider=org.eclipse.persistence.jpa.PersistenceProvider,
service.id=125, service.bundleid=111, service.scope=singleton}
No services in use.
This is with equinox 3.10.2.v20150203-1939, J8.
BTW, I see the same thing happening with the mysql and the pax-jdbc-config
bundles. The DataSourceFactory service shows as being registered by the mysql
bundle, while it is actually registered by the config bundle.
What am I missing here? Is this a feature, a bug, or is my brain not flexible
enough to comprehend this?
Thanks,
Erwin