commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <>
Subject Re: [CONFIGURATION] Help with optional XML file in override section of configuration builder.
Date Wed, 16 Sep 2009 13:22:42 GMT

On Sep 16, 2009, at 4:37 AM, Martin Ritchie wrote:

> Oliver,
> Thanks for the pointer to use DefaultConfigurationBuilder.
> Whilst this now does not need to have the test.config property defined
> or the file existing it does behave differently to the older
> ConfigurationFactory.
> With the configuration as shown in the pastie
> ( the ConfigurationFactory builds a single
> configuration tree where later elements are overwritten by newer
> values.
> So given the configuration values shown here:
> The value of in config.xml (MemoryMessageStore) is
> overwritten with (SlowMessageStore) from the test.config. The
> additional values in the test.config are also propgated in to the
> final configuraiton.
> When I changed to use the DefaultConfigurationBuilder the entire
> virtualhosts section was overwritten as a result the other virtualhost
> sections in config.xml were lost.
> Is there a way I can get the behaviour as seen with the
> ConfigurationFactory but have the file parsing/loading of the
> DefaultConfigurationBuilder?
What you are experiencing is probably a result of the NodeCombiner  
being used. In trunk you will find a "MergeCombiner" that may behave  
the way you want it to. If you build trunk you should look at the  
updated documentation as it provides some documentation on how the 3  
combiners work and what results they will produce in various situations.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message