Thanks,

I can see the reasoning. That is confusing though. I thought that the MySQL 
driver now registered the DSF, just like the h2 bundle, so I removed the 
pax-jdbc bundles... after which the MySQL bundle did NOT 'register' the DSF 
anymore :-)

Erwin
 
> El ene. 6, 2017, a las 10:30, Christian Schneider <[email protected]> 
> escribió:
> 
> I think the behaviour of pax-jdbc is correct. It should register the DSF in 
> the name of the jdbc provider bundle.
> 
> Christian
> 
> 2017-01-06 13:52 GMT+01:00 Erwin Hogeweg <[email protected]>:
>> Christian,
>> 
>>> On Jan 6, 2017, at 2:22 AM, Christian Schneider <[email protected]> 
>>> wrote:
>>> 
>>> 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?
>>> 
>> Sure: https://issues.apache.org/jira/browse/ARIES-1652
>> 
>> Do you want me to open a separate one for the pax-jdbc-config bundle? I 
>> believe that bundle has the same author(s)…
>> 
>> Erwin
>>> Christian
>>> 
>>> 2017-01-05 14:31 GMT+01:00 Erwin Hogeweg <[email protected]>:
>>>> 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
>>> 
>>> Open Source Architect
>>> http://www.talend.com
>> 
> 
> 
> 
> -- 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
> 
> Open Source Architect
> http://www.talend.com

Reply via email to