sessionMgr.storeSessionData(null);
sessionMgr.storeSessionData(null, eval.scriptingEngine);
    public synchronized void stop() {        // invoke global onStop() function        RequestEvaluator eval = null;        try {            eval = getEvaluator();            eval.invokeInternal(null, "onStop", RequestEvaluator.EMPTY_ARGS);        } catch (Exception x) {            logError("Error in " + name + "onStop()", x);        } finally {            releaseEvaluator(eval);        }        // mark app as stopped        running = false;        // stop all threads, this app is going down        if (worker != null) {            worker.interrupt();        }        worker = null;        // stop evaluators        if (allThreads != null) {            for (Enumeration e = allThreads.elements(); e.hasMoreElements();) {                RequestEvaluator ev = (RequestEvaluator) e.nextElement();                ev.stopTransactor();            }        }        // remove evaluators        allThreads.removeAllElements();        freeThreads.clear();        // shut down node manager and embedded db        try {            nmgr.shutdown();        } catch (DatabaseException dbx) {            System.err.println("Error shutting down embedded db: " + dbx);        }        // tell the extensions that we're stopped.        if (Server.getServer() != null) {            Vector extensions = Server.getServer().getExtensions();            for (int i = 0; i < extensions.size(); i++) {                HelmaExtension ext = (HelmaExtension) extensions.get(i);                ext.applicationStopped(this);            }        }        // store the sessions if wanted        if ("true".equalsIgnoreCase(getProperty("persistentSessions"))) {            sessionMgr.storeSessionData(null);        }        sessionMgr.shutdown();    }