1 43 package net.jforum.util.preferences; 44 45 import java.io.IOException ; 46 47 import net.jforum.util.FileChangeListener; 48 49 import org.apache.log4j.Logger; 50 51 55 public class QueriesFileListener implements FileChangeListener 56 { 57 private static final Logger logger = Logger.getLogger(QueriesFileListener.class); 58 59 62 public void fileChanged(String filename) 63 { 64 try { 65 logger.info("Reloading "+ filename); 66 SystemGlobals.loadQueries(filename); 67 68 String driverQueries = SystemGlobals.getValue(ConfigKeys.SQL_QUERIES_DRIVER); 69 70 if (!filename.equals(driverQueries)) { 72 SystemGlobals.loadQueries(driverQueries); 73 } 74 } 75 catch (IOException e) { 76 logger.info(e); 77 } 78 } 79 80 } 81 | Popular Tags |