commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Meyer" <>
Subject [Configuration] CombinedConfiguration reloading issue in conjunction with SubnodeConfiguration
Date Fri, 06 Mar 2009 09:05:33 GMT
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

CombinedConfiguration config = new CombinedConfiguration();
config.setNodeCombiner(new OverrideCombiner());
XMLConfiguration c = new XMLConfiguration(xmlFile);
c.setReloadingStrategy(new FileChangedReloadingStrategy());
SubnodeConfiguration sub = c.configurationAt("foo", true);

config.getInt("bar"); /* this works fine */
// now touch the underlying xml configuration file and wait at least 5

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:

You can also have a look at the attached JUnit testcase.

Any hint would be very appreciated.



View raw message