svn trunk component settings

4 posts / 0 new
Last post
Anonymous
svn trunk component settings

hi,
i use version of tigase from svn trunk and i have a problem - when i try to initialize my custom component with values from init.properties - setProperties is called with Map of size 1. checking code i found that on component setup in ConfiguratorAbstract in void setup(Configurable component) when properites Map taken from init.properties is merged with default values taken from component.getDefaults(), it is first put back into configRepo (before setting this map in component); and in void ConfigurationCache.putProperties(String, Map) - addItem is called, which calls repoChangeList.itemUpdate(item), where repoChangeList is instance of ConfiguratorAbstract, which on update calls setProperties of component with Map containing only this single changed item, which happens before(!) setting all the parameters at one time.
is this propper behaviour? beta3 was behaving otherwise.
thank you

Application: 
dima

my name is dima

Yes, this is correct behavior and expected.
We have recently started working on configuration changing at run-time for the server and it appears it is much more efficient to push to the component only properties which have been changed, rather than all Component configuration options.
Therefore, it is completely valid and possible that setProperties is called with Map of one or more elements.

dima

mm, thanks
i would love to see new description of configuration routing in http://www.tigase.org/content/component-implementation-lesson-2-configuration :)