Le 09/02/2011 15:59, Pierre Henry Perret a écrit :
This is exactly what I want to know.

I suppose it is the typed object I'm using :

context.getServiceReference(Class string);

Yes
http://www.osgi.org/javadoc/r4v42/org/osgi/framework/ServiceReference.html

But am I sur the sid is valid not null ?

The spec mandates each service to have an id (service.id), pid is optional
http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#SERVICE_ID

Do I not have to use the ServiceRegistration ?

ServiceRegistration is the handle the frameworks returns to you when you register a service.
ServiceReference is a consumer-side object

--G






2011/2/9 Guillaume Sauthier<[email protected]>

There is a service.id (or service.pid) property in the ServiceReference
How do you retrieve your reference ?
--G

Le 09/02/2011 15:20, Pierre Henry Perret a écrit :

  How to get the OSGi Service ID of a component instance (a service) ?
Thanks

--
Pierre





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
  • SID Pierre Henry Perret
    • Re: SID Guillaume Sauthier
      • Re: SID Pierre Henry Perret
        • Re: SID Guillaume Sauthier

Reply via email to