Hi

Currently our Declarative Services implementation statically binds 
configuration to the using bundle when such configuration is used to configure 
a component. The intent was to follow the Configuration Admin specification 
which also statically binds configuration to ManagedService[Factory] when first 
supplying configuration which is not previously bound.

This mechanism works really nicely but has a problematic drawback: When the 
"owning" bundle is uninstalled, configurations remain bound. If a new version 
of the same bundle is installed later, configuration will thus not be supplied 
because, presumably, the bundle will have a new bundle location and thus does 
not own the configuration.

I could imagine two solutions to this problem:

(1) DS does not statically bind configuration any longer. So, if unbound 
configuration is supplied to a component, it just remains unbound. In my 
understanding, this bends on the semantics defined by the Configuration Admin 
specification.

(2) DS maintains a list of configurations which it has statically bound. On 
Bundle UNINSTALLED events the location of the uninstalled bundle is matched 
against the bindings of the configurations in the list and if such bindings 
exists, it is removed again. In my understanding, this would be the correct 
solution but is somewhat more complicated to implement.

WDYT ?

Regards
Felix


Reply via email to