Pavel Savara schrieb:
Hi,
I have properties configuration file with FileChangedReloadingStrategy
inside combined configuration. It doesn't seem to reload automaticaly
when file changes. I have to go and call reload() on that configuration
in code (((PropertiesConfiguration) conf).reload();) after that change
is propagated fine. But as i said it not happening automatically just by
reading properties from that file.
Thanks for help
Pavel
CombinedConfiguration has the setForceReloadCheck() method. If called
with *true* as argument, the configuration will trigger the reloading
strategies of its children on each property access.
This should solve your problem.
Oliver
Combined configuration file:
<configuration>
<override>
<!-- Load the system properties -->
<system/>
<!-- Load gsxweb properties-->
<properties fileName="gsxweb.properties"
throwExceptionOnMissing="false"
config-name="gsxweb" config-optional="false" listDelimiter="|">
<reloadingStrategy refreshDelay="1"
config-class="org.apache.commons.configuration.reloading.FileChangedReloadingStrategy"/>
</properties>
</override>
</configuration>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]