That might be a bug. I think jpa container should register
both EntityManagerFactoryBuilder and EntityManagerFactory in the name of
the persistence bundle.
Can you open an issue for this?

Christian

2017-01-05 14:31 GMT+01:00 Erwin Hogeweg <erwin.hoge...@me.com>:

> 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
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>

Reply via email to