commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: [Configuration] CombinedConfiguration reloading issue in conjunction with SubnodeConfiguration
Date Fri, 06 Mar 2009 16:10:19 GMT
I don't see an attachment. Can you open a Jira and attach the test  
case there?

Ralph

On Mar 6, 2009, at 1:05 AM, Paul Meyer wrote:

> Hey *,
>
> I'm currently having an issue with the CombinedConfiguration. I  
> would be
> very grateful if someone could have a look at the problem. I'm not  
> sure if
> this is a bug, if I miss something or if I'm just trying to use the
> CombinedConfiguration in way it isn't design for. Here's what I'm  
> trying to
> do:
>
> /**********************************************************/
> CombinedConfiguration config = new CombinedConfiguration();
> config.setForceReloadCheck(true);
> config.setNodeCombiner(new OverrideCombiner());
> XMLConfiguration c = new XMLConfiguration(xmlFile);
> c.setReloadingStrategy(new FileChangedReloadingStrategy());
> SubnodeConfiguration sub = c.configurationAt("foo", true);
> config.addConfiguration(sub);
>
> config.getInt("bar"); /* this works fine */
> // now touch the underlying xml configuration file and wait at least 5
> seconds
>
> config.getInt("bar"); /* this isn't working anymore - a
> java.util.NoSuchElementException is thrown !*/
> /**********************************************************/
>
> The format of the configuration xml file I use is the following:
> '<config><foo><bar>0</bar></for></config>'.
>
> You can also have a look at the attached JUnit testcase.
>
> Any hint would be very appreciated.
>
> Thanks
> Paul
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message