commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David J. M. Karlsen" <da...@davidkarlsen.com>
Subject commons-configuration
Date Tue, 24 Oct 2006 10:18:47 GMT
Hi!

I have the following bit of code:

propConfig = new PropertiesConfiguration( configFilename );

         FileChangedReloadingStrategy reloadingStrategy = new 
FileChangedReloadingStrategy() {
             //FIXME - never called!? why?
             public void reloadingPerformed()
             {
                 LOG.warn( "Reloading configuration" );
                 super.reloadingPerformed();
                 try {
                     afterPropertiesSet();
                 }
                 catch ( Exception e ) {
                     LOG.error( e );
                     throw new NestableRuntimeException( e.getMessage(), 
e );
                 }
             }
             };

         reloadingStrategy.setRefreshDelay( refreshDelay );
         propConfig.setReloadingStrategy( reloadingStrategy );


But for some reason reloadingPerformed is never called if I change the 
file).

I'm calling getProperty("dummy") in each iteration (rest of code) - so 
polling should happen.

What am I doing wrong?




-- 
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message