Move session manager initialization code towards the end of init() to make sure
other fiels are initialized when we start (request evaluators must be usable).
This commit is contained in:
parent
892fe4b6e1
commit
c4c3505545
1 changed files with 11 additions and 11 deletions
|
@ -274,17 +274,6 @@ public final class Application implements IPathElement, Runnable {
|
||||||
|
|
||||||
running = true;
|
running = true;
|
||||||
|
|
||||||
// create and init session manager
|
|
||||||
String sessionMgrImpl = props.getProperty("sessionManagerImpl",
|
|
||||||
"helma.framework.core.SessionManager");
|
|
||||||
sessionMgr = (SessionManager) Class.forName(sessionMgrImpl).newInstance();
|
|
||||||
sessionMgr.init(this);
|
|
||||||
|
|
||||||
// read the sessions if wanted
|
|
||||||
if ("true".equalsIgnoreCase(getProperty("persistentSessions"))) {
|
|
||||||
sessionMgr.loadSessionData(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
// create and init type mananger
|
// create and init type mananger
|
||||||
typemgr = new TypeManager(this);
|
typemgr = new TypeManager(this);
|
||||||
typemgr.createPrototypes();
|
typemgr.createPrototypes();
|
||||||
|
@ -364,6 +353,17 @@ public final class Application implements IPathElement, Runnable {
|
||||||
nmgr = new NodeManager(this);
|
nmgr = new NodeManager(this);
|
||||||
nmgr.init(dbDir.getAbsoluteFile(), props);
|
nmgr.init(dbDir.getAbsoluteFile(), props);
|
||||||
|
|
||||||
|
// create and init session manager
|
||||||
|
String sessionMgrImpl = props.getProperty("sessionManagerImpl",
|
||||||
|
"helma.framework.core.SessionManager");
|
||||||
|
sessionMgr = (SessionManager) Class.forName(sessionMgrImpl).newInstance();
|
||||||
|
sessionMgr.init(this);
|
||||||
|
|
||||||
|
// read the sessions if wanted
|
||||||
|
if ("true".equalsIgnoreCase(getProperty("persistentSessions"))) {
|
||||||
|
sessionMgr.loadSessionData(null);
|
||||||
|
}
|
||||||
|
|
||||||
// reset the classloader to the parent/system/server classloader.
|
// reset the classloader to the parent/system/server classloader.
|
||||||
Thread.currentThread().setContextClassLoader(typemgr.getClassLoader().getParent());
|
Thread.currentThread().setContextClassLoader(typemgr.getClassLoader().getParent());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue