You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Oliver Heger <ol...@oliver-heger.de> on 2008/10/15 21:52:50 UTC
Re: [CONFIGURATION] FileChangedReloadingStrategy inside combined
configuration
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: 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
Re: [CONFIGURATION] FileChangedReloadingStrategy inside combined
configuration
Posted by Pavel Savara <pa...@intrade.com>.
>
> 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.
Thanks that was it.
Pavel
On Wed, 2008-10-15 at 21:52 +0200, Oliver Heger wrote:
> 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: 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org