> Point is, that you are probably doing the wrong thing:
> The objectClass is an array possibly containing more than one entry. If
> the ConfigurationAdmin class name is not the first entry it is missed.

I had actually checked that that was not the case; the code I posted was 
slightly simplified. Sorry if that was misleading. Would it then be a bug?


> If you are interested in the ConfigurationAdmin service, you should
> explicitly listen for that service and nothing else:
> 
>    bundleContext.addServiceListener(listener,  "(objectClass=" + 
> ConfigurationAdmin.class.getName() + ")");
>
> Better yet: use the ServiceTracker:

While I could do either, the app is kind of a generic bundle/service container 
that acts on ALL installed bundles and services. It obviously does something 
special for a ConfigAdmin, but other than that I was really hoping to keep it 
as generic as possible.


> Yet, you should not assign the ConfigurationAdmin service to an instance
> field in this case and instead call the getService() when you need the 
> service.

Why is that? (Just trying to understand if there's something about OSGi or 
Felix that I don't have a handle on yet.)

Thanks,
Ulf



      


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

Reply via email to