Hi Leen, in the activator, you could ask the service registry for the config admin service and explicitly get the configuration from it, then using it to make a call to the updated() method of the ManagedService interface yourself.
Make sure to add a reference to the config admin, otherwise your service might be started before it is available. The downside with that will be that your service goes down when the ConfigurationAdminService does. Tobias On 18.11.2010, at 17:24, "Leen Toelen" <[email protected]> wrote: > Hi, > > I have some trouble understanding the correlation between FileInstall > and ManagedServices. > > This is an activator: > public void start(BundleContext context) throws Exception { > MyImpl impl = new MyImpl(); //implements two interfaces, one of > which managedservice > > Properties properties = new Properties(); > properties.put(Constants.SERVICE_PID, "myservicepid"); > String[] interfaces = { ManagedService.class.getName(), > MyInterface.class.getName() }; > context.registerService(interfaces, impl, properties); > } > > and under my fileinstall managed directory I hava myservicepid.cfg > with key-value pairs in it. > > The question is when the services are registered and available to listeners. > - when the activator is started > - after fileinstall is calls updated(Dictionary) on the ManagedService > (using ConfigurationAdmin) > > should the implementation check whether is has been configured or not, > or does felix do this for me? If not, is there a way to only register > myImpl as "MyInterface" after it has been configured? > > Regards, > Leen > > --------------------------------------------------------------------- > 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]

