From bbf1122ddb95ab9d578d552b2454f585c2802304 Mon Sep 17 00:00:00 2001 From: hns <hannesw@gmail.com> Date: Thu, 1 Feb 2001 00:55:36 +0000 Subject: [PATCH] minor corrections --- src/helma/framework/core/RequestEvaluator.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index 21fae7c1..826f2517 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -512,9 +512,7 @@ public class RequestEvaluator implements Runnable { // if no request arrived, release ressources and thread if (reqtype == NONE && rtx == localrtx) rtx = null; - } catch (InterruptedException ir) { - localrtx.closeConnections (); - } + } catch (InterruptedException ir) {} } public synchronized ResponseTrans invoke (RequestTrans req, User user) throws Exception { @@ -615,17 +613,17 @@ public class RequestEvaluator implements Runnable { * notify. */ public synchronized void stopThread () { - // IServer.getLogger().log ("Stopping Thread"); + IServer.getLogger().log ("Stopping Thread "+rtx); Transactor t = rtx; evaluator.thread = null; rtx = null; if (t != null) { if (reqtype != NONE) { + reqtype = NONE; + t.kill (); try { t.abort (); } catch (Exception ignore) {} - t.kill (); - reqtype = NONE; } else { notifyAll (); } @@ -634,6 +632,10 @@ public class RequestEvaluator implements Runnable { } private synchronized void checkThread () throws InterruptedException { + + if (app.stopped) + throw new ApplicationStoppedException (); + if (rtx == null || !rtx.isAlive()) { // IServer.getLogger().log ("Starting Thread"); rtx = new Transactor (this, app.threadgroup, app.nmgr);