[
https://issues.apache.org/jira/browse/CONFIGURATION-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558293#comment-13558293
]
Oliver Heger commented on CONFIGURATION-523:
--------------------------------------------
The reloading strategy declared in {{master-config.xml}} is associated with the
specific child configuration only.
In order to enable reloading for {{DefaultConfigurationBuilder}} itself, you
have to set a reloading strategy at the builder object, e.g.:
{code}
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
builder.setFile(masterConfigFile);
builder.setReloadingStrategy(new FileChangedReloadingStrategy());
{code}
> DefaultConfigurationBuilder is not reloading its base file
> ----------------------------------------------------------
>
> Key: CONFIGURATION-523
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-523
> Project: Commons Configuration
> Issue Type: Bug
> Components: File reloading
> Affects Versions: 1.9
> Environment: Windows / Eclipse
> Reporter: Jean-Marc
> Priority: Critical
> Labels: DefaultConfigurationBuilder, reloading
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Create a DefaultConfigurationBuilder with this example file master-config.xml
> :
> <?xml version="1.0" encoding="UTF-8" ?>
> <configuration>
> <header>
> <result forceReloadCheck="true"/>
> </header>
> <system/>
> <override>
> <properties fileName="webapp-commons.properties"
> throwExceptionOnMissing="true">
> <reloadingStrategy refreshDelay="1000"
> config-class="org.apache.commons.configuration.reloading.FileChangedReloadingStrategy"/>
>
> </properties>
> </override>
> </configuration>
> A modification to "webapp-commons.properties" is well detected and the file
> is reloaded.
> But if you modify the master-config.xml itself, nothing is reloaded, no event
> are thrown.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira