From 857544fd9b573679b8932eb66f72d29b9c2d770d Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 25 Jan 2001 20:57:30 +0000 Subject: [PATCH] doesnt use thead.stop() anymore --- src/helma/objectmodel/db/Transactor.java | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/helma/objectmodel/db/Transactor.java b/src/helma/objectmodel/db/Transactor.java index 8398ae87..b44f8612 100644 --- a/src/helma/objectmodel/db/Transactor.java +++ b/src/helma/objectmodel/db/Transactor.java @@ -194,10 +194,12 @@ public class Transactor extends Thread { if (active) { active = false; - nmgr.db.abortTransaction (txn); - txn = null; + if (txn != null) { + nmgr.db.abortTransaction (txn); + txn = null; + } + IServer.getLogger().log (tname+" aborted after "+(System.currentTimeMillis()-tstart)+" millis"); } - IServer.getLogger().log (tname+" aborted after "+(System.currentTimeMillis()-tstart)+" millis"); } public synchronized void kill () { @@ -206,22 +208,15 @@ public class Transactor extends Thread { // evaluator, so we can hope that it stops without doing anything else. try { join (500); - } catch (InterruptedException ir) { - Thread.currentThread().interrupt(); - } + } catch (InterruptedException ir) {} // Interrupt the thread if it has not noticed the flag (e.g. because it is busy // reading from a network socket). if (isAlive()) { interrupt (); try { - join (3000); - } catch (InterruptedException ignore) { - Thread.currentThread().interrupt(); - } - if (isAlive()) - // Sorry to be so rude... - stop (new TimeoutException()); + join (1000); + } catch (InterruptedException ir) {} } }