minor corrections

This commit is contained in:
hns 2001-02-01 00:55:36 +00:00
parent a7075f8df0
commit bbf1122ddb

View file

@ -512,9 +512,7 @@ public class RequestEvaluator implements Runnable {
// if no request arrived, release ressources and thread // if no request arrived, release ressources and thread
if (reqtype == NONE && rtx == localrtx) if (reqtype == NONE && rtx == localrtx)
rtx = null; rtx = null;
} catch (InterruptedException ir) { } catch (InterruptedException ir) {}
localrtx.closeConnections ();
}
} }
public synchronized ResponseTrans invoke (RequestTrans req, User user) throws Exception { public synchronized ResponseTrans invoke (RequestTrans req, User user) throws Exception {
@ -615,17 +613,17 @@ public class RequestEvaluator implements Runnable {
* notify. * notify.
*/ */
public synchronized void stopThread () { public synchronized void stopThread () {
// IServer.getLogger().log ("Stopping Thread"); IServer.getLogger().log ("Stopping Thread "+rtx);
Transactor t = rtx; Transactor t = rtx;
evaluator.thread = null; evaluator.thread = null;
rtx = null; rtx = null;
if (t != null) { if (t != null) {
if (reqtype != NONE) { if (reqtype != NONE) {
reqtype = NONE;
t.kill ();
try { try {
t.abort (); t.abort ();
} catch (Exception ignore) {} } catch (Exception ignore) {}
t.kill ();
reqtype = NONE;
} else { } else {
notifyAll (); notifyAll ();
} }
@ -634,6 +632,10 @@ public class RequestEvaluator implements Runnable {
} }
private synchronized void checkThread () throws InterruptedException { private synchronized void checkThread () throws InterruptedException {
if (app.stopped)
throw new ApplicationStoppedException ();
if (rtx == null || !rtx.isAlive()) { if (rtx == null || !rtx.isAlive()) {
// IServer.getLogger().log ("Starting Thread"); // IServer.getLogger().log ("Starting Thread");
rtx = new Transactor (this, app.threadgroup, app.nmgr); rtx = new Transactor (this, app.threadgroup, app.nmgr);