Hi Thomas,
> This is a usecase for registering a ServiceFactory. A ServiceFactory allows 
> for a service implementation to know which bundle is getting and using their 
> service implementations with the 
> org.osgi.framework.ServiceFactory.getService(Bundle, ServiceRegistration) 
> method. The framework will call this method and pass the Bundle object which 
> is getting the service. The service implementation can then use this 
> information to log error messages against the bundle that got the service.
> 
> So Bundle Y would register a ServiceFactory for each service it offered and 
> then would be informed of Bundle X using its service and can react properly 
> when Bundle X gets a service and uses it incorrectly.
> 
That will work with new code (which can be made a service by design). To make a 
jump to another subject : I wonder what the overhead is compared to using a 
traditional way (read : using a class and calling methods). Using services will 
still not work for existing libs which aren't a service  and I'm also 
attempting to find a solution for that.


Regards,



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

Reply via email to