Use TransientNode for app data node and prevent a bug where the helma logdir property breaks log4j.

This commit is contained in:
hns 2009-09-08 19:51:28 +00:00
parent fc1d8dfb26
commit f6e5680a16

View file

@ -431,7 +431,7 @@ public final class Application implements Runnable {
nmgr.init(dbDir.getAbsoluteFile(), props);
// create the app cache node exposed as app.data
cachenode = new Node("app", null, getWrappedNodeManager());
cachenode = new TransientNode("app");
// create and init session manager
String sessionMgrImpl = props.getProperty("sessionManagerImpl",
@ -1889,6 +1889,8 @@ public final class Application implements Runnable {
}
}
String loggerFactory = props.getProperty("loggerFactory", "helma.util.Logging");
if ("helma.util.Logging".equals(loggerFactory)) {
logDir = props.getProperty("logdir", "log");
if (System.getProperty("helma.logdir") == null) {
// set up helma.logdir system property in case we're using it
@ -1896,6 +1898,9 @@ public final class Application implements Runnable {
File dir = new File(logDir);
System.setProperty("helma.logdir", dir.getAbsolutePath());
}
} else {
logDir = null;
}
// set log level for event log in case it is a helma.util.Logger
if (eventLog instanceof Logger) {