Hi But could you tell me a bit more about how that should be done ? I suppose
the user bundles would need to export a ServiceFactory, and the daemon would then need to track these in Whiteboard fashion.
Basically, yes. If the daemon is interested in the client object, services (or ServiceFactories) would need to be registered. In case of anyone else being interested, services registration is of course also required. If the deamon then sees such a service appear, he could take further actions. Whether you use a service or a ServiceFactory depends on your use case: If all bundles use the same service object, register just the service, if each bundle should get its own service instance, register a ServiceFactory. In the case of Declarative Services you may declare the component to be a service to be lazily loaded set the "immediate" attribute of the component element to true. Implementations - at least this is what the Apache Felix implementation does - will likely register a ServiceFactory for such lazily loaded components but return the same actual service object to all bundles. But this is implementation specific. In you special case, I would suggest to define an interface (this may well be marker interface) and have the client services being registered under (at least) this name. The daemon may then for service changes of this marker interface classes or (even better) use a ServiceTracker to track the client services. Hope, this helps. Regards Felix
_______________________________________________ OSGi Developer Mail List [email protected] http://www2.osgi.org/mailman/listinfo/osgi-dev
