diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index b01b0804..3ebd0f64 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -27,7 +27,9 @@ import java.rmi.server.*; * requests from the Web server or XML-RPC port and dispatches them to * the evaluators. */ -public final class Application extends UnicastRemoteObject implements IRemoteApp, IPathElement, IReplicatedApp, Runnable { +public final class Application + extends UnicastRemoteObject + implements IRemoteApp, IPathElement, IReplicatedApp, Runnable { private String name; SystemProperties props, dbProps; @@ -1091,10 +1093,10 @@ public final class Application extends UnicastRemoteObject implements IRemoteApp for (Enumeration e = cloned.elements (); e.hasMoreElements (); ) { Session session = (Session) e.nextElement (); if (now - session.lastTouched () > sessionTimeout * 60000) { - INode usernode = session.getUserNode (); - if (usernode != null) { + NodeHandle userhandle = session.userHandle; + if (userhandle != null) { try { - eval.invokeFunction (usernode, "onLogout", new Object[0]); + eval.invokeFunction (userhandle, "onLogout", new Object[0]); } catch (Exception ignore) {} } destroySession(session); diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index 595e4ab8..13a3c321 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -367,6 +367,16 @@ public final class RequestEvaluator implements Runnable { // Just a human readable descriptor of this invocation String funcdesc = app.getName()+":internal/"+method; + // if thisObject is an instance of NodeHandle, get the node object itself. + if (thisObject != null && thisObject instanceof NodeHandle) { + thisObject = ((NodeHandle) thisObject).getNode (app.nmgr.safe); + // see if a valid node was returned + if (thisObject == null) { + reqtype = NONE; + break; + } + } + // avoid going into transaction if called function doesn't exist boolean functionexists = true; functionexists = scriptingEngine.hasFunction (thisObject, method);