commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Savara <pavel.sav...@intrade.com>
Subject Re: [CONFIGURATION] FileChangedReloadingStrategy inside combined configuration
Date Thu, 16 Oct 2008 11:11:20 GMT
> 
> 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


Mime
View raw message