1 43 package net.jforum.util.preferences; 44 45 import java.io.IOException ; 46 47 import net.jforum.ConfigLoader; 48 import net.jforum.util.FileChangeListener; 49 50 import org.apache.log4j.Logger; 51 52 56 public class SystemGlobalsListener implements FileChangeListener 57 { 58 private static final Logger logger = Logger.getLogger(SystemGlobalsListener.class); 59 60 63 public void fileChanged(String filename) 64 { 65 try { 66 logger.info("Reloading "+ filename); 67 68 SystemGlobals.initGlobals(SystemGlobals.getApplicationPath(), 69 SystemGlobals.getValue(ConfigKeys.DEFAULT_CONFIG)); 70 ConfigLoader.listenForChanges(); 71 } 72 catch (IOException e) { 73 logger.info(e); 74 e.printStackTrace(); 75 } 76 } 77 78 } 79 | Popular Tags |