Project

General

Profile

Changing one component's config with Ad-Hoc command reloads all components

Gabriel Rossetti
Added about 4 years ago

Hi all,

I have an issue, lets say I have 2 components names CompA & CompB, they have a config property called "enable-processing". If I use PSI to change CompA's config like this:

1) Service Discovery -> Configuration management -> Execute Command

2) Choose "Manage active server components" and press "Execute"

3) Choose "Edit" and press "Finish"

4) Choose "CompA" and press "Finish"

5) No need to change anything (but you can if you want), press finish

initializationCompleted() is called on every component in the system (including CompA & CompB) and so is setProperties()@. Is this normal? I find it a bit strange that changing one component's config has an effect on all other components. I also find it a bit strange that @initializationCompleted() is called at all when doing this.

If instead I change CompA's config like this:

1) Service Discovery -> Configuration management -> Execute Command

2) Choose "Update item configuration" and press "Execute"

3) Find your component and the property you want to change (in my case "CompA/enable-processing") and press "Finish"

4) No need to change anything (but you can if you want), press finish

in this case it reacts as expected, it updates the property (calls setProperties() on CompA only) and does not call initializationCompleted() on any components.

Thank you,

Gabriel


Replies (2)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 4 years ago

Yes, this is all working as designed and expected.

  1. "Manage active server components" command is a significant change to the whole system as it potentially brings up or takes down a server component. As a result Tigase performs something like a soft-restart. Components have to be prepare that this may happen at any time and have to handle it correctly.

  2. "Update item configuration" command is much less significant. It is designed to change just a configuration of a single, already running component. Therefore, effect on the whole system is much less significant and other components do not have to be aware of it.

Added by Gabriel Rossetti almost 4 years ago

Ok, thanks for the info.

Could you pls add this to the initializationCompleted() javadoc or at least to the page that describes the component startup order? From reading those docs I was not able to know the above.

Thanks

    (1-2/2)