user.onLogout() is called again, at least for automatic session
timeouts.
This commit is contained in:
parent
6c32d0f073
commit
5e34cfdcc7
2 changed files with 16 additions and 4 deletions
|
@ -27,7 +27,9 @@ import java.rmi.server.*;
|
||||||
* requests from the Web server or XML-RPC port and dispatches them to
|
* requests from the Web server or XML-RPC port and dispatches them to
|
||||||
* the evaluators.
|
* 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;
|
private String name;
|
||||||
SystemProperties props, dbProps;
|
SystemProperties props, dbProps;
|
||||||
|
@ -1091,10 +1093,10 @@ public final class Application extends UnicastRemoteObject implements IRemoteApp
|
||||||
for (Enumeration e = cloned.elements (); e.hasMoreElements (); ) {
|
for (Enumeration e = cloned.elements (); e.hasMoreElements (); ) {
|
||||||
Session session = (Session) e.nextElement ();
|
Session session = (Session) e.nextElement ();
|
||||||
if (now - session.lastTouched () > sessionTimeout * 60000) {
|
if (now - session.lastTouched () > sessionTimeout * 60000) {
|
||||||
INode usernode = session.getUserNode ();
|
NodeHandle userhandle = session.userHandle;
|
||||||
if (usernode != null) {
|
if (userhandle != null) {
|
||||||
try {
|
try {
|
||||||
eval.invokeFunction (usernode, "onLogout", new Object[0]);
|
eval.invokeFunction (userhandle, "onLogout", new Object[0]);
|
||||||
} catch (Exception ignore) {}
|
} catch (Exception ignore) {}
|
||||||
}
|
}
|
||||||
destroySession(session);
|
destroySession(session);
|
||||||
|
|
|
@ -367,6 +367,16 @@ public final class RequestEvaluator implements Runnable {
|
||||||
// Just a human readable descriptor of this invocation
|
// Just a human readable descriptor of this invocation
|
||||||
String funcdesc = app.getName()+":internal/"+method;
|
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
|
// avoid going into transaction if called function doesn't exist
|
||||||
boolean functionexists = true;
|
boolean functionexists = true;
|
||||||
functionexists = scriptingEngine.hasFunction (thisObject, method);
|
functionexists = scriptingEngine.hasFunction (thisObject, method);
|
||||||
|
|
Loading…
Add table
Reference in a new issue