diff options
author | Marc Laukien <marc@zeroc.com> | 2004-01-13 16:07:56 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2004-01-13 16:07:56 +0000 |
commit | 7db65aa3d43b934793aa7cc03c5adbe1f1876a20 (patch) | |
tree | fac7ee47f9b4d85a70b99df9c5f00d879a366206 /java/src/IceInternal/ThreadPool.java | |
parent | minor cleanup (diff) | |
download | ice-7db65aa3d43b934793aa7cc03c5adbe1f1876a20.tar.bz2 ice-7db65aa3d43b934793aa7cc03c5adbe1f1876a20.tar.xz ice-7db65aa3d43b934793aa7cc03c5adbe1f1876a20.zip |
promotion fix
Diffstat (limited to 'java/src/IceInternal/ThreadPool.java')
-rw-r--r-- | java/src/IceInternal/ThreadPool.java | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/java/src/IceInternal/ThreadPool.java b/java/src/IceInternal/ThreadPool.java index 813c6ac8816..0256c015b0f 100644 --- a/java/src/IceInternal/ThreadPool.java +++ b/java/src/IceInternal/ThreadPool.java @@ -627,6 +627,12 @@ public final class ThreadPool promoteFollower(); factory.shutdown(); + + // + // No "continue", because we want shutdown to be done in + // its own thread from this pool. Therefore we called + // promoteFollower(). + // } else { @@ -650,6 +656,13 @@ public final class ThreadPool sw.toString() + "\n" + handler.toString(); _instance.logger().error(s); } + + // + // No "continue", because we want finished() to be + // called in its own thread from this pool. Note + // that this means that finished() must call + // promoteFollower(). + // } else { @@ -690,7 +703,30 @@ public final class ThreadPool assert(stream.pos() == stream.size()); } - handler.message(stream, this); + // + // Provide a new mesage to the handler. + // + try + { + handler.message(stream, this); + } + catch(Ice.LocalException ex) + { + java.io.StringWriter sw = new java.io.StringWriter(); + java.io.PrintWriter pw = new java.io.PrintWriter(sw); + ex.printStackTrace(pw); + pw.flush(); + String s = "exception in `" + _prefix + "' while calling finished():\n" + + sw.toString() + "\n" + handler.toString(); + _instance.logger().error(s); + } + + // + // No "continue", because we want message() to + // be called in its own thread from this + // pool. Note that this means that message() + // must call promoteFollower(). + // } finally { |