You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Natalius <te...@mxe.fr> on 2014/03/28 10:32:34 UTC

DOSGI and service properties

Hi,

I would like to filter a remote service by its service properties but 
DOSGI not propagate this properties in client side, is it exact ? So how 
I can do that ?

Thanks

Re: DOSGI and service properties

Posted by Natalius <te...@mxe.fr>.
Here an extract of my test code :

public final class ServiceFactory implements ManagedServiceFactory {
...
	public void updated(String pid,
			@SuppressWarnings("rawtypes") Dictionary configuration)
			throws ConfigurationException {
			this.deleted(pid);

			final Dictionary<String, Object> serviceProperties = new 
Hashtable<String, Object>();
			final Enumeration<String> keys = configuration.keys();

			while (keys.hasMoreElements()) {
				final String key = keys.nextElement();

				serviceProperties.put(key, configuration.get(key));
			}

			serviceProperties.put("service.exported.interfaces", "*");

			final ServiceImpl service = new ServiceImpl();

			this.serviceRegistrations.put(pid, context.registerService(
					Service.class.getName(), service, serviceProperties));
		}
	}
...
}

Le 28.03.2014 14:29, Christian Schneider a écrit :
> Can you provide a complete example on github. I am not sure how you
> set the properties from config admin to the service.
> What I can imagine is that you publish the service with one set of
> properties and the change them.
> This might not yet be supported by cxf DOSGi but I have to see the
> code to make sure.
> 
> Christian
> 
> On 28.03.2014 14:21, Natalius wrote:
>> I filter on my service
>> 
>> Le 28.03.2014 14:13, Jean-Baptiste Onofré a écrit :
>>> But you filter on your service or the configadmin service ?!
>>> 
>>> On 03/28/2014 02:11 PM, Natalius wrote:
>>>> Ok so why when I filter a service, created by a 
>>>> ManagedServiceFactory,
>>>> by its properties without use DOSGI it works.
>>>> 
>>>> 
>>>> Le 28.03.2014 13:47, Jean-Baptiste Onofré a écrit :
>>>>> Yes, but it's a different thing.
>>>>> 
>>>>> Again, I think you mix both.
>>>>> 
>>>>> DOSGi is *only* OSGi service layer. So it will expose the service 
>>>>> with
>>>>> the property (in your example the serviceProperties map).
>>>>> 
>>>>> It's already what I said on the Karaf mailing list:
>>>>> ConfigAdmin/ManagedServiceFactory is different from the properties 
>>>>> of
>>>>> the service itself.
>>>>> 
>>>>> If you want to use the ConfigAdmin properties as service 
>>>>> properties,
>>>>> it's up to you to "inject" in the serviceProperties map.
>>>>> 
>>>>> Regards
>>>>> JB
>>>>> 
>>>>> On 03/28/2014 01:44 PM, Natalius wrote:
>>>>>> Le 28.03.2014 13:40, Jean-Baptiste Onofré a écrit :
>>>>>>> Where are the other properties what you want to use in the filter 
>>>>>>> ?
>>>>>> The other properties are configured by a cfg file because I use a
>>>>>> ManagedServiceFactory
>>>>>> 
>>>>>> 
>>>>>>> Regards
>>>>>>> JB
>>>>>>> 
>>>>>>> On 03/28/2014 12:53 PM, Natalius wrote:
>>>>>>>> So :
>>>>>>>> 
>>>>>>>> final Dictionary<String, Object> serviceProperties = new
>>>>>>>> Hashtable<String, Object>();
>>>>>>>> 
>>>>>>>> serviceProperties.put("service.exported.interfaces", "*");
>>>>>>>> 
>>>>>>>> context.registerService(Service.class.getName(), new 
>>>>>>>> ServiceImpl(),
>>>>>>>> serviceProperties);
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Le 28.03.2014 12:36, Christian Schneider a écrit :
>>>>>>>>> How do you export your service? Can you provide a snippet of 
>>>>>>>>> the
>>>>>>>>> code?
>>>>>>>>> 
>>>>>>>>> Christian
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On 28.03.2014 11:25, Natalius wrote:
>>>>>>>>>> I searched but I found nothing on this subject.
>>>>>>>>>> When I use Cellar-DOSGI I can't see my service properties so 
>>>>>>>>>> the
>>>>>>>>>> problem is DOSGI or Cellar.
>>>>>>>>>> 
>>>>>>>>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>>>>>>>>> Did you take a look on the DOSGi spec ?
>>>>>>>>>>> 
>>>>>>>>>>> Regards
>>>>>>>>>>> JB
>>>>>>>>>>> 
>>>>>>>>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>> 
>>>>>>>>>>>> I would like to filter a remote service by its service 
>>>>>>>>>>>> properties
>>>>>>>>>>>> but
>>>>>>>>>>>> DOSGI not propagate this properties in client side, is it 
>>>>>>>>>>>> exact ?
>>>>>>>>>>>> So how
>>>>>>>>>>>> I can do that ?
>>>>>>>>>>>> 
>>>>>>>>>>>> Thanks

Re: DOSGI and service properties

Posted by Natalius <te...@mxe.fr>.
Ok but my system can have several bundles deploying a same service in 
several node but with differents properties, how I can filter ?
If I can't do that the distributed OSGi is limited !

Le 28.03.2014 14:31, Jean-Baptiste Onofré a écrit :
> It would not be supported by Cellar neither, but IMHO, it's not a good
> design (if it's what I'm thinking about).
> 
> Regards
> JB
> 
> On 03/28/2014 02:29 PM, Christian Schneider wrote:
>> Can you provide a complete example on github. I am not sure how you 
>> set
>> the properties from config admin to the service.
>> What I can imagine is that you publish the service with one set of
>> properties and the change them.
>> This might not yet be supported by cxf DOSGi but I have to see the 
>> code
>> to make sure.
>> 
>> Christian
>> 
>> On 28.03.2014 14:21, Natalius wrote:
>>> I filter on my service
>>> 
>>> Le 28.03.2014 14:13, Jean-Baptiste Onofré a écrit :
>>>> But you filter on your service or the configadmin service ?!
>>>> 
>>>> On 03/28/2014 02:11 PM, Natalius wrote:
>>>>> Ok so why when I filter a service, created by a 
>>>>> ManagedServiceFactory,
>>>>> by its properties without use DOSGI it works.
>>>>> 
>>>>> 
>>>>> Le 28.03.2014 13:47, Jean-Baptiste Onofré a écrit :
>>>>>> Yes, but it's a different thing.
>>>>>> 
>>>>>> Again, I think you mix both.
>>>>>> 
>>>>>> DOSGi is *only* OSGi service layer. So it will expose the service 
>>>>>> with
>>>>>> the property (in your example the serviceProperties map).
>>>>>> 
>>>>>> It's already what I said on the Karaf mailing list:
>>>>>> ConfigAdmin/ManagedServiceFactory is different from the properties 
>>>>>> of
>>>>>> the service itself.
>>>>>> 
>>>>>> If you want to use the ConfigAdmin properties as service 
>>>>>> properties,
>>>>>> it's up to you to "inject" in the serviceProperties map.
>>>>>> 
>>>>>> Regards
>>>>>> JB
>>>>>> 
>>>>>> On 03/28/2014 01:44 PM, Natalius wrote:
>>>>>>> Le 28.03.2014 13:40, Jean-Baptiste Onofré a écrit :
>>>>>>>> Where are the other properties what you want to use in the 
>>>>>>>> filter ?
>>>>>>> The other properties are configured by a cfg file because I use a
>>>>>>> ManagedServiceFactory
>>>>>>> 
>>>>>>> 
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>> 
>>>>>>>> On 03/28/2014 12:53 PM, Natalius wrote:
>>>>>>>>> So :
>>>>>>>>> 
>>>>>>>>> final Dictionary<String, Object> serviceProperties = new
>>>>>>>>> Hashtable<String, Object>();
>>>>>>>>> 
>>>>>>>>> serviceProperties.put("service.exported.interfaces", "*");
>>>>>>>>> 
>>>>>>>>> context.registerService(Service.class.getName(), new 
>>>>>>>>> ServiceImpl(),
>>>>>>>>> serviceProperties);
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Le 28.03.2014 12:36, Christian Schneider a écrit :
>>>>>>>>>> How do you export your service? Can you provide a snippet of 
>>>>>>>>>> the
>>>>>>>>>> code?
>>>>>>>>>> 
>>>>>>>>>> Christian
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> On 28.03.2014 11:25, Natalius wrote:
>>>>>>>>>>> I searched but I found nothing on this subject.
>>>>>>>>>>> When I use Cellar-DOSGI I can't see my service properties so 
>>>>>>>>>>> the
>>>>>>>>>>> problem is DOSGI or Cellar.
>>>>>>>>>>> 
>>>>>>>>>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>>>>>>>>>> Did you take a look on the DOSGi spec ?
>>>>>>>>>>>> 
>>>>>>>>>>>> Regards
>>>>>>>>>>>> JB
>>>>>>>>>>>> 
>>>>>>>>>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I would like to filter a remote service by its service
>>>>>>>>>>>>> properties
>>>>>>>>>>>>> but
>>>>>>>>>>>>> DOSGI not propagate this properties in client side, is it
>>>>>>>>>>>>> exact ?
>>>>>>>>>>>>> So how
>>>>>>>>>>>>> I can do that ?
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Thanks
>> 
>> 

Re: DOSGI and service properties

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
It would not be supported by Cellar neither, but IMHO, it's not a good 
design (if it's what I'm thinking about).

Regards
JB

On 03/28/2014 02:29 PM, Christian Schneider wrote:
> Can you provide a complete example on github. I am not sure how you set
> the properties from config admin to the service.
> What I can imagine is that you publish the service with one set of
> properties and the change them.
> This might not yet be supported by cxf DOSGi but I have to see the code
> to make sure.
>
> Christian
>
> On 28.03.2014 14:21, Natalius wrote:
>> I filter on my service
>>
>> Le 28.03.2014 14:13, Jean-Baptiste Onofré a écrit :
>>> But you filter on your service or the configadmin service ?!
>>>
>>> On 03/28/2014 02:11 PM, Natalius wrote:
>>>> Ok so why when I filter a service, created by a ManagedServiceFactory,
>>>> by its properties without use DOSGI it works.
>>>>
>>>>
>>>> Le 28.03.2014 13:47, Jean-Baptiste Onofré a écrit :
>>>>> Yes, but it's a different thing.
>>>>>
>>>>> Again, I think you mix both.
>>>>>
>>>>> DOSGi is *only* OSGi service layer. So it will expose the service with
>>>>> the property (in your example the serviceProperties map).
>>>>>
>>>>> It's already what I said on the Karaf mailing list:
>>>>> ConfigAdmin/ManagedServiceFactory is different from the properties of
>>>>> the service itself.
>>>>>
>>>>> If you want to use the ConfigAdmin properties as service properties,
>>>>> it's up to you to "inject" in the serviceProperties map.
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 03/28/2014 01:44 PM, Natalius wrote:
>>>>>> Le 28.03.2014 13:40, Jean-Baptiste Onofré a écrit :
>>>>>>> Where are the other properties what you want to use in the filter ?
>>>>>> The other properties are configured by a cfg file because I use a
>>>>>> ManagedServiceFactory
>>>>>>
>>>>>>
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>> On 03/28/2014 12:53 PM, Natalius wrote:
>>>>>>>> So :
>>>>>>>>
>>>>>>>> final Dictionary<String, Object> serviceProperties = new
>>>>>>>> Hashtable<String, Object>();
>>>>>>>>
>>>>>>>> serviceProperties.put("service.exported.interfaces", "*");
>>>>>>>>
>>>>>>>> context.registerService(Service.class.getName(), new ServiceImpl(),
>>>>>>>> serviceProperties);
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Le 28.03.2014 12:36, Christian Schneider a écrit :
>>>>>>>>> How do you export your service? Can you provide a snippet of the
>>>>>>>>> code?
>>>>>>>>>
>>>>>>>>> Christian
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 28.03.2014 11:25, Natalius wrote:
>>>>>>>>>> I searched but I found nothing on this subject.
>>>>>>>>>> When I use Cellar-DOSGI I can't see my service properties so the
>>>>>>>>>> problem is DOSGI or Cellar.
>>>>>>>>>>
>>>>>>>>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>>>>>>>>> Did you take a look on the DOSGi spec ?
>>>>>>>>>>>
>>>>>>>>>>> Regards
>>>>>>>>>>> JB
>>>>>>>>>>>
>>>>>>>>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> I would like to filter a remote service by its service
>>>>>>>>>>>> properties
>>>>>>>>>>>> but
>>>>>>>>>>>> DOSGI not propagate this properties in client side, is it
>>>>>>>>>>>> exact ?
>>>>>>>>>>>> So how
>>>>>>>>>>>> I can do that ?
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks
>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: DOSGI and service properties

Posted by Christian Schneider <ch...@die-schneider.net>.
Can you provide a complete example on github. I am not sure how you set 
the properties from config admin to the service.
What I can imagine is that you publish the service with one set of 
properties and the change them.
This might not yet be supported by cxf DOSGi but I have to see the code 
to make sure.

Christian

On 28.03.2014 14:21, Natalius wrote:
> I filter on my service
>
> Le 28.03.2014 14:13, Jean-Baptiste Onofré a écrit :
>> But you filter on your service or the configadmin service ?!
>>
>> On 03/28/2014 02:11 PM, Natalius wrote:
>>> Ok so why when I filter a service, created by a ManagedServiceFactory,
>>> by its properties without use DOSGI it works.
>>>
>>>
>>> Le 28.03.2014 13:47, Jean-Baptiste Onofré a écrit :
>>>> Yes, but it's a different thing.
>>>>
>>>> Again, I think you mix both.
>>>>
>>>> DOSGi is *only* OSGi service layer. So it will expose the service with
>>>> the property (in your example the serviceProperties map).
>>>>
>>>> It's already what I said on the Karaf mailing list:
>>>> ConfigAdmin/ManagedServiceFactory is different from the properties of
>>>> the service itself.
>>>>
>>>> If you want to use the ConfigAdmin properties as service properties,
>>>> it's up to you to "inject" in the serviceProperties map.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 03/28/2014 01:44 PM, Natalius wrote:
>>>>> Le 28.03.2014 13:40, Jean-Baptiste Onofré a écrit :
>>>>>> Where are the other properties what you want to use in the filter ?
>>>>> The other properties are configured by a cfg file because I use a
>>>>> ManagedServiceFactory
>>>>>
>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>> On 03/28/2014 12:53 PM, Natalius wrote:
>>>>>>> So :
>>>>>>>
>>>>>>> final Dictionary<String, Object> serviceProperties = new
>>>>>>> Hashtable<String, Object>();
>>>>>>>
>>>>>>> serviceProperties.put("service.exported.interfaces", "*");
>>>>>>>
>>>>>>> context.registerService(Service.class.getName(), new ServiceImpl(),
>>>>>>> serviceProperties);
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Le 28.03.2014 12:36, Christian Schneider a écrit :
>>>>>>>> How do you export your service? Can you provide a snippet of the
>>>>>>>> code?
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>>
>>>>>>>> On 28.03.2014 11:25, Natalius wrote:
>>>>>>>>> I searched but I found nothing on this subject.
>>>>>>>>> When I use Cellar-DOSGI I can't see my service properties so the
>>>>>>>>> problem is DOSGI or Cellar.
>>>>>>>>>
>>>>>>>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>>>>>>>> Did you take a look on the DOSGi spec ?
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>> JB
>>>>>>>>>>
>>>>>>>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I would like to filter a remote service by its service 
>>>>>>>>>>> properties
>>>>>>>>>>> but
>>>>>>>>>>> DOSGI not propagate this properties in client side, is it 
>>>>>>>>>>> exact ?
>>>>>>>>>>> So how
>>>>>>>>>>> I can do that ?
>>>>>>>>>>>
>>>>>>>>>>> Thanks


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: DOSGI and service properties

Posted by Natalius <te...@mxe.fr>.
I filter on my service

Le 28.03.2014 14:13, Jean-Baptiste Onofré a écrit :
> But you filter on your service or the configadmin service ?!
> 
> On 03/28/2014 02:11 PM, Natalius wrote:
>> Ok so why when I filter a service, created by a ManagedServiceFactory,
>> by its properties without use DOSGI it works.
>> 
>> 
>> Le 28.03.2014 13:47, Jean-Baptiste Onofré a écrit :
>>> Yes, but it's a different thing.
>>> 
>>> Again, I think you mix both.
>>> 
>>> DOSGi is *only* OSGi service layer. So it will expose the service 
>>> with
>>> the property (in your example the serviceProperties map).
>>> 
>>> It's already what I said on the Karaf mailing list:
>>> ConfigAdmin/ManagedServiceFactory is different from the properties of
>>> the service itself.
>>> 
>>> If you want to use the ConfigAdmin properties as service properties,
>>> it's up to you to "inject" in the serviceProperties map.
>>> 
>>> Regards
>>> JB
>>> 
>>> On 03/28/2014 01:44 PM, Natalius wrote:
>>>> Le 28.03.2014 13:40, Jean-Baptiste Onofré a écrit :
>>>>> Where are the other properties what you want to use in the filter ?
>>>> The other properties are configured by a cfg file because I use a
>>>> ManagedServiceFactory
>>>> 
>>>> 
>>>>> Regards
>>>>> JB
>>>>> 
>>>>> On 03/28/2014 12:53 PM, Natalius wrote:
>>>>>> So :
>>>>>> 
>>>>>> final Dictionary<String, Object> serviceProperties = new
>>>>>> Hashtable<String, Object>();
>>>>>> 
>>>>>> serviceProperties.put("service.exported.interfaces", "*");
>>>>>> 
>>>>>> context.registerService(Service.class.getName(), new 
>>>>>> ServiceImpl(),
>>>>>> serviceProperties);
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Le 28.03.2014 12:36, Christian Schneider a écrit :
>>>>>>> How do you export your service? Can you provide a snippet of the
>>>>>>> code?
>>>>>>> 
>>>>>>> Christian
>>>>>>> 
>>>>>>> 
>>>>>>> On 28.03.2014 11:25, Natalius wrote:
>>>>>>>> I searched but I found nothing on this subject.
>>>>>>>> When I use Cellar-DOSGI I can't see my service properties so the
>>>>>>>> problem is DOSGI or Cellar.
>>>>>>>> 
>>>>>>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>>>>>>> Did you take a look on the DOSGi spec ?
>>>>>>>>> 
>>>>>>>>> Regards
>>>>>>>>> JB
>>>>>>>>> 
>>>>>>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>>>>>>> Hi,
>>>>>>>>>> 
>>>>>>>>>> I would like to filter a remote service by its service 
>>>>>>>>>> properties
>>>>>>>>>> but
>>>>>>>>>> DOSGI not propagate this properties in client side, is it 
>>>>>>>>>> exact ?
>>>>>>>>>> So how
>>>>>>>>>> I can do that ?
>>>>>>>>>> 
>>>>>>>>>> Thanks

Re: DOSGI and service properties

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
But you filter on your service or the configadmin service ?!

On 03/28/2014 02:11 PM, Natalius wrote:
> Ok so why when I filter a service, created by a ManagedServiceFactory,
> by its properties without use DOSGI it works.
>
>
> Le 28.03.2014 13:47, Jean-Baptiste Onofré a écrit :
>> Yes, but it's a different thing.
>>
>> Again, I think you mix both.
>>
>> DOSGi is *only* OSGi service layer. So it will expose the service with
>> the property (in your example the serviceProperties map).
>>
>> It's already what I said on the Karaf mailing list:
>> ConfigAdmin/ManagedServiceFactory is different from the properties of
>> the service itself.
>>
>> If you want to use the ConfigAdmin properties as service properties,
>> it's up to you to "inject" in the serviceProperties map.
>>
>> Regards
>> JB
>>
>> On 03/28/2014 01:44 PM, Natalius wrote:
>>> Le 28.03.2014 13:40, Jean-Baptiste Onofré a écrit :
>>>> Where are the other properties what you want to use in the filter ?
>>> The other properties are configured by a cfg file because I use a
>>> ManagedServiceFactory
>>>
>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 03/28/2014 12:53 PM, Natalius wrote:
>>>>> So :
>>>>>
>>>>> final Dictionary<String, Object> serviceProperties = new
>>>>> Hashtable<String, Object>();
>>>>>
>>>>> serviceProperties.put("service.exported.interfaces", "*");
>>>>>
>>>>> context.registerService(Service.class.getName(), new ServiceImpl(),
>>>>> serviceProperties);
>>>>>
>>>>>
>>>>>
>>>>> Le 28.03.2014 12:36, Christian Schneider a écrit :
>>>>>> How do you export your service? Can you provide a snippet of the
>>>>>> code?
>>>>>>
>>>>>> Christian
>>>>>>
>>>>>>
>>>>>> On 28.03.2014 11:25, Natalius wrote:
>>>>>>> I searched but I found nothing on this subject.
>>>>>>> When I use Cellar-DOSGI I can't see my service properties so the
>>>>>>> problem is DOSGI or Cellar.
>>>>>>>
>>>>>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>>>>>> Did you take a look on the DOSGi spec ?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>>
>>>>>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I would like to filter a remote service by its service properties
>>>>>>>>> but
>>>>>>>>> DOSGI not propagate this properties in client side, is it exact ?
>>>>>>>>> So how
>>>>>>>>> I can do that ?
>>>>>>>>>
>>>>>>>>> Thanks

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: DOSGI and service properties

Posted by Natalius <te...@mxe.fr>.
Ok so why when I filter a service, created by a ManagedServiceFactory, 
by its properties without use DOSGI it works.


Le 28.03.2014 13:47, Jean-Baptiste Onofré a écrit :
> Yes, but it's a different thing.
> 
> Again, I think you mix both.
> 
> DOSGi is *only* OSGi service layer. So it will expose the service with
> the property (in your example the serviceProperties map).
> 
> It's already what I said on the Karaf mailing list:
> ConfigAdmin/ManagedServiceFactory is different from the properties of
> the service itself.
> 
> If you want to use the ConfigAdmin properties as service properties,
> it's up to you to "inject" in the serviceProperties map.
> 
> Regards
> JB
> 
> On 03/28/2014 01:44 PM, Natalius wrote:
>> Le 28.03.2014 13:40, Jean-Baptiste Onofré a écrit :
>>> Where are the other properties what you want to use in the filter ?
>> The other properties are configured by a cfg file because I use a
>> ManagedServiceFactory
>> 
>> 
>>> Regards
>>> JB
>>> 
>>> On 03/28/2014 12:53 PM, Natalius wrote:
>>>> So :
>>>> 
>>>> final Dictionary<String, Object> serviceProperties = new
>>>> Hashtable<String, Object>();
>>>> 
>>>> serviceProperties.put("service.exported.interfaces", "*");
>>>> 
>>>> context.registerService(Service.class.getName(), new ServiceImpl(),
>>>> serviceProperties);
>>>> 
>>>> 
>>>> 
>>>> Le 28.03.2014 12:36, Christian Schneider a écrit :
>>>>> How do you export your service? Can you provide a snippet of the 
>>>>> code?
>>>>> 
>>>>> Christian
>>>>> 
>>>>> 
>>>>> On 28.03.2014 11:25, Natalius wrote:
>>>>>> I searched but I found nothing on this subject.
>>>>>> When I use Cellar-DOSGI I can't see my service properties so the
>>>>>> problem is DOSGI or Cellar.
>>>>>> 
>>>>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>>>>> Did you take a look on the DOSGi spec ?
>>>>>>> 
>>>>>>> Regards
>>>>>>> JB
>>>>>>> 
>>>>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>>>>> Hi,
>>>>>>>> 
>>>>>>>> I would like to filter a remote service by its service 
>>>>>>>> properties
>>>>>>>> but
>>>>>>>> DOSGI not propagate this properties in client side, is it exact 
>>>>>>>> ?
>>>>>>>> So how
>>>>>>>> I can do that ?
>>>>>>>> 
>>>>>>>> Thanks

Re: DOSGI and service properties

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Yes, but it's a different thing.

Again, I think you mix both.

DOSGi is *only* OSGi service layer. So it will expose the service with 
the property (in your example the serviceProperties map).

It's already what I said on the Karaf mailing list: 
ConfigAdmin/ManagedServiceFactory is different from the properties of 
the service itself.

If you want to use the ConfigAdmin properties as service properties, 
it's up to you to "inject" in the serviceProperties map.

Regards
JB

On 03/28/2014 01:44 PM, Natalius wrote:
> Le 28.03.2014 13:40, Jean-Baptiste Onofré a écrit :
>> Where are the other properties what you want to use in the filter ?
> The other properties are configured by a cfg file because I use a
> ManagedServiceFactory
>
>
>> Regards
>> JB
>>
>> On 03/28/2014 12:53 PM, Natalius wrote:
>>> So :
>>>
>>> final Dictionary<String, Object> serviceProperties = new
>>> Hashtable<String, Object>();
>>>
>>> serviceProperties.put("service.exported.interfaces", "*");
>>>
>>> context.registerService(Service.class.getName(), new ServiceImpl(),
>>> serviceProperties);
>>>
>>>
>>>
>>> Le 28.03.2014 12:36, Christian Schneider a écrit :
>>>> How do you export your service? Can you provide a snippet of the code?
>>>>
>>>> Christian
>>>>
>>>>
>>>> On 28.03.2014 11:25, Natalius wrote:
>>>>> I searched but I found nothing on this subject.
>>>>> When I use Cellar-DOSGI I can't see my service properties so the
>>>>> problem is DOSGI or Cellar.
>>>>>
>>>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>>>> Did you take a look on the DOSGi spec ?
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I would like to filter a remote service by its service properties
>>>>>>> but
>>>>>>> DOSGI not propagate this properties in client side, is it exact ?
>>>>>>> So how
>>>>>>> I can do that ?
>>>>>>>
>>>>>>> Thanks

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: DOSGI and service properties

Posted by Natalius <te...@mxe.fr>.
Le 28.03.2014 13:40, Jean-Baptiste Onofré a écrit :
> Where are the other properties what you want to use in the filter ?
The other properties are configured by a cfg file because I use a 
ManagedServiceFactory


> Regards
> JB
> 
> On 03/28/2014 12:53 PM, Natalius wrote:
>> So :
>> 
>> final Dictionary<String, Object> serviceProperties = new
>> Hashtable<String, Object>();
>> 
>> serviceProperties.put("service.exported.interfaces", "*");
>> 
>> context.registerService(Service.class.getName(), new ServiceImpl(),
>> serviceProperties);
>> 
>> 
>> 
>> Le 28.03.2014 12:36, Christian Schneider a écrit :
>>> How do you export your service? Can you provide a snippet of the 
>>> code?
>>> 
>>> Christian
>>> 
>>> 
>>> On 28.03.2014 11:25, Natalius wrote:
>>>> I searched but I found nothing on this subject.
>>>> When I use Cellar-DOSGI I can't see my service properties so the
>>>> problem is DOSGI or Cellar.
>>>> 
>>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>>> Did you take a look on the DOSGi spec ?
>>>>> 
>>>>> Regards
>>>>> JB
>>>>> 
>>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>>> Hi,
>>>>>> 
>>>>>> I would like to filter a remote service by its service properties 
>>>>>> but
>>>>>> DOSGI not propagate this properties in client side, is it exact ?
>>>>>> So how
>>>>>> I can do that ?
>>>>>> 
>>>>>> Thanks

Re: DOSGI and service properties

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Where are the other properties what you want to use in the filter ?

Regards
JB

On 03/28/2014 12:53 PM, Natalius wrote:
> So :
>
> final Dictionary<String, Object> serviceProperties = new
> Hashtable<String, Object>();
>
> serviceProperties.put("service.exported.interfaces", "*");
>
> context.registerService(Service.class.getName(), new ServiceImpl(),
> serviceProperties);
>
>
>
> Le 28.03.2014 12:36, Christian Schneider a écrit :
>> How do you export your service? Can you provide a snippet of the code?
>>
>> Christian
>>
>>
>> On 28.03.2014 11:25, Natalius wrote:
>>> I searched but I found nothing on this subject.
>>> When I use Cellar-DOSGI I can't see my service properties so the
>>> problem is DOSGI or Cellar.
>>>
>>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>>> Did you take a look on the DOSGi spec ?
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>>> Hi,
>>>>>
>>>>> I would like to filter a remote service by its service properties but
>>>>> DOSGI not propagate this properties in client side, is it exact ?
>>>>> So how
>>>>> I can do that ?
>>>>>
>>>>> Thanks

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: DOSGI and service properties

Posted by Christian Schneider <ch...@die-schneider.net>.
You did not specify any custom properties besides the property to 
specify the dosgi export.
What do you specify as filter on the client side?

Christian

On 28.03.2014 12:53, Natalius wrote:
> So :
>
> final Dictionary<String, Object> serviceProperties = new 
> Hashtable<String, Object>();
>
> serviceProperties.put("service.exported.interfaces", "*");
>
> context.registerService(Service.class.getName(), new ServiceImpl(), 
> serviceProperties);
>
>
>
> Le 28.03.2014 12:36, Christian Schneider a écrit :
>> How do you export your service? Can you provide a snippet of the code?
>>
>> Christian
>>

-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: DOSGI and service properties

Posted by Natalius <te...@mxe.fr>.
So :

final Dictionary<String, Object> serviceProperties = new 
Hashtable<String, Object>();

serviceProperties.put("service.exported.interfaces", "*");

context.registerService(Service.class.getName(), new ServiceImpl(), 
serviceProperties);



Le 28.03.2014 12:36, Christian Schneider a écrit :
> How do you export your service? Can you provide a snippet of the code?
> 
> Christian
> 
> 
> On 28.03.2014 11:25, Natalius wrote:
>> I searched but I found nothing on this subject.
>> When I use Cellar-DOSGI I can't see my service properties so the 
>> problem is DOSGI or Cellar.
>> 
>> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>>> Did you take a look on the DOSGi spec ?
>>> 
>>> Regards
>>> JB
>>> 
>>> On 03/28/2014 10:32 AM, Natalius wrote:
>>>> Hi,
>>>> 
>>>> I would like to filter a remote service by its service properties 
>>>> but
>>>> DOSGI not propagate this properties in client side, is it exact ? So 
>>>> how
>>>> I can do that ?
>>>> 
>>>> Thanks

Re: DOSGI and service properties

Posted by Christian Schneider <ch...@die-schneider.net>.
How do you export your service? Can you provide a snippet of the code?

Christian


On 28.03.2014 11:25, Natalius wrote:
> I searched but I found nothing on this subject.
> When I use Cellar-DOSGI I can't see my service properties so the 
> problem is DOSGI or Cellar.
>
> Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
>> Did you take a look on the DOSGi spec ?
>>
>> Regards
>> JB
>>
>> On 03/28/2014 10:32 AM, Natalius wrote:
>>> Hi,
>>>
>>> I would like to filter a remote service by its service properties but
>>> DOSGI not propagate this properties in client side, is it exact ? So 
>>> how
>>> I can do that ?
>>>
>>> Thanks


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: DOSGI and service properties

Posted by Natalius <te...@mxe.fr>.
I searched but I found nothing on this subject.
When I use Cellar-DOSGI I can't see my service properties so the problem 
is DOSGI or Cellar.

Le 28.03.2014 10:54, Jean-Baptiste Onofré a écrit :
> Did you take a look on the DOSGi spec ?
> 
> Regards
> JB
> 
> On 03/28/2014 10:32 AM, Natalius wrote:
>> Hi,
>> 
>> I would like to filter a remote service by its service properties but
>> DOSGI not propagate this properties in client side, is it exact ? So 
>> how
>> I can do that ?
>> 
>> Thanks

Re: DOSGI and service properties

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Did you take a look on the DOSGi spec ?

Regards
JB

On 03/28/2014 10:32 AM, Natalius wrote:
> Hi,
>
> I would like to filter a remote service by its service properties but
> DOSGI not propagate this properties in client side, is it exact ? So how
> I can do that ?
>
> Thanks

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: DOSGI and service properties

Posted by Christian Schneider <ch...@die-schneider.net>.
Hmm... interesting. I would have expected the properties to be present 
on the client side. If I can reproduce then this is definately a bug.

Christian


On 28.03.2014 10:32, Natalius wrote:
> Hi,
>
> I would like to filter a remote service by its service properties but 
> DOSGI not propagate this properties in client side, is it exact ? So 
> how I can do that ?
>
> Thanks


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com