Again, it does not seem to be possible to do this filtering with a getServiceReferences call on the result array. I can't find a way to identify a remote service as the representation of a local one (on the ServiceReference objects) at the moment.

I would suggest something like a property "service.loopback.registration" for loopback registrations or more general "service.duplicate.registration", so that it's possible to set a filter to get only one ServiceReference for a service.

Am 12.01.2011 14:39, schrieb Peter Kriens:
An unfortunately property name service.remote.registration because this is NOT 
standard.

Again, I think your optimizing too much, for these special cases a bit of Java 
code works much better than making the filer language more complex.

Kind regards,

        Peter Kriens

On 12 jan 2011, at 13:59, Martin Petzold wrote:

Am 11.01.2011 16:57, schrieb Martin Petzold:
Hello Peter,

I have looked through the specs again and still consider this filter option 
would be nice to have.

It does not seem to be possible to do this filtering with one 
getServiceReferences call on the result array. Is it possible to identify a 
remote service as the representation of a local one (on the ServiceReference 
objects)?
For ECF loopbacks can be filtered out with "(!(service.remote.registration=true))", there is also a 
system property "-Dorg.eclipse.ecf.osgi.services.discovery.allowLoopbackReference=true" so it would 
be possible to have loopback services registered as with OSGi specs (and "service.imported" set).

I also noticed that some implementations (in my opinion) mess around in the service 
registration. r-OSGi in ECF e.g. registeres TWO services (proxies) in the registry for 
ONE remote service. As funny as it is the filter for me (getting local+remote services 
without loopbacks) is then 
"(!(service.remote.registration=true))(!(service.imported=*))".

But it's not the same with a different Provider or CXF-DOSGi etc.
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev


--
Martin Petzold

Martinsfeld 14
D-50676 Köln
Deutschland

Telefon: +49 (0)221 / 2595961
Mobil: +49 (0)179 / 9220154

Blog: www.zetablog.de

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to