Hi, Am Sonntag, den 05.06.2011, 06:49 +0100 schrieb Andrei Pozolotin: > Hello. > > I am using felix ConfigurationAdmin & SCR; > > question: how can I combine ConfigurationAdmin & component self-update? > > for example, SCR component has a ui located on the screen (x,y); > this is pushed from ConfigurationAdmin to the component via > SCR.activate() & SCR.modified(); > > now user moves a ui to a new (x,y); per osgi spec, ConfigurationAdmin > does not differentiate on the update request source; > > hence, Configuration.update(properties) (trying to persist the new > (x,y)) > if called from configuration target component itself, > will create a recursion, which it does; > > and Configuration.update() /* with no properties*/ does not create a > recursion, > but does not persist the configuration either; > > what am I missing? :-)
It is under your own control to break the recursion: Your component will only have to call Configuration Admin configuration if such configuration is not provided through the activate or modify method, i.e. only if such update is induced externally. BTW: for your sample use case of UI location you might want to look into the OSGi Preferences Service specification which sounds more appropriate for such configuration (which generally is different per user). Regards Felix Regards Felix > > Thank you, > > Andrei. > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

