|
From: <mic...@us...> - 2003-11-18 01:29:32
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config
In directory sc8-pr-cvs1:/tmp/cvs-serv27504/modules/core/src/com/babeldoc/core/config
Modified Files:
Tag: TEMP_MIKEA
ConfigService.java
Log Message:
Added the ability to refresh the scanner configuration without stopping the application container.
Index: ConfigService.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/config/ConfigService.java,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -C2 -d -r1.12 -r1.12.2.1
*** ConfigService.java 27 Jun 2003 02:19:57 -0000 1.12
--- ConfigService.java 18 Nov 2003 01:29:28 -0000 1.12.2.1
***************
*** 91,95 ****
*/
public class ConfigService implements IConfigService {
! /** constant: configuration file */
public static final String CONFIG = "babel.config";
--- 91,98 ----
*/
public class ConfigService implements IConfigService {
! /** The log service to use */
! private static LogService log = LogService.getInstance(ConfigService.class.getName());
!
! /** constant: configuration file */
public static final String CONFIG = "babel.config";
***************
*** 121,126 ****
lruNum = Integer.parseInt(lruNumStr);
} catch (Exception e) {
! LogService.getInstance().logError(com.babeldoc.core.I18n.get("007001",
! lruNumStr), e);
}
}
--- 124,128 ----
lruNum = Integer.parseInt(lruNumStr);
} catch (Exception e) {
! log.logError(com.babeldoc.core.I18n.get("007001", lruNumStr), e);
}
}
***************
*** 136,140 ****
configService = (IConfigService) Class.forName(config).newInstance();
} catch (Exception e) {
! LogService.getInstance().logError(e);
}
}
--- 138,142 ----
configService = (IConfigService) Class.forName(config).newInstance();
} catch (Exception e) {
! log.logError(e);
}
}
***************
*** 174,183 ****
*/
public IConfig getConfig(String name) {
- //System.out.println("Getting config: "+name);
IConfig config = (IConfig) configs.get(name);
if (config == null) {
synchronized (this) {
! //System.out.println("Config: "+name+" not found, loading.");
config = configService.getConfig(name);
configs.put(name, config);
--- 176,184 ----
*/
public IConfig getConfig(String name) {
IConfig config = (IConfig) configs.get(name);
if (config == null) {
synchronized (this) {
! log.logDebug("Config "+name+" not found in cache, loading.");
config = configService.getConfig(name);
configs.put(name, config);
***************
*** 229,233 ****
public static void clearCache() {
configs.clear();
! LogService.getInstance().logDebug("Clearing Entire Config Cache");
}
--- 230,234 ----
public static void clearCache() {
configs.clear();
! log.logDebug("Clearing entire config cache");
}
***************
*** 240,244 ****
public static void clearCache(String name) {
configs.remove(name);
! LogService.getInstance().logDebug("Clearing Config Cache for " + name);
}
--- 241,245 ----
public static void clearCache(String name) {
configs.remove(name);
! log.logDebug("Clearing config cache for " + name);
}
***************
*** 263,269 ****
*/
public synchronized boolean saveConfig(String name, IConfig config) {
- //System.out.println("Getting config: "+name);
if (config != null) {
! //System.out.println("Config: "+name+" not found, loading.");
return configService.saveConfig(name, config);
} else {
--- 264,269 ----
*/
public synchronized boolean saveConfig(String name, IConfig config) {
if (config != null) {
! log.logDebug("Saving config "+name);
return configService.saveConfig(name, config);
} else {
|