felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Leangen <o...@leangen.net>
Subject Re: [SCR] Obtaining component configuration
Date Fri, 18 Sep 2015 08:23:51 GMT

Hi Felix,

Thanks for the reply. More info below.

>> So then, what is the right way to obtain the existing properties of a component (other
than the ones I just set)? I was not successful when digging around the spec to find the answer.
> 
> But, as BJ on bndtools notes, if you are just a DS component, you should not be fiddling
with ConfigAdmin and just have an activate method which gets the configuration injected —
either as part of the ComponentContext or the Map<String, Object> argument to the activate
method. This way you also guarantee that you get the default values for your properties declared
in the descriptor which don’t exist in the configuration.

Right!

What I apparently did not explain well was that I am trying to do this from a separate management
service (in a separate bundle). The management service needs to get the target component’s
current properties, then update them based on what the existing (and desired) properties are.

Since I have been unsuccessful at obtaining the existing properties, I am currently unable
to do this.


Cheers,
=David




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message