I am using
Jetty 7.0.2 snapshot code. In a web application, I have a servlet that
is sending content back to a client (as most servlets do). If I stop
the Jetty instance while the servlet is busy doing the "generating
content for a client" thing, I get this exception:
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.blockWritable(SelectChannelEndPoint.java:324)
at
org.eclipse.jetty.http.AbstractGenerator.blockForOutput(AbstractGenerator.java:480)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:98)
at com.stoneware.servlets.HtmlLogger.write(HtmlLogger.java:133)
at com.stoneware.servlets.HtmlLogger.writeln(HtmlLogger.java:142)
at com.stoneware.servlets.HtmlLogger.connect(HtmlLogger.java:89)
at com.stoneware.swconsole.SWLog.service(SWLog.java:35)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)
....
and then this message: 1 threads could not be stopped
Of course, the thread is still hanging out after the stop has finished
which, in my case, is causing a classloader leak:
"qtp165789330-15" prio=10 tid=0x0000000041c9e800 nid=0x7f24 in
Object.wait() [0x00007f1fb79fb000..0x00007f1fb79fcb70]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00007f1fc34885d0> (a
org.eclipse.jetty.io.nio.SelectChannelEndPoint)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.blockWritable(SelectChannelEndPoint.java:324)
- locked <0x00007f1fc34885d0> (a
org.eclipse.jetty.io.nio.SelectChannelEndPoint)
at
org.eclipse.jetty.http.AbstractGenerator.blockForOutput(AbstractGenerator.java:480)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:147)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:98)
at com.stoneware.servlets.HtmlLogger.write(HtmlLogger.java:133)
at com.stoneware.servlets.HtmlLogger.writeln(HtmlLogger.java:142)
at com.stoneware.servlets.HtmlLogger.connect(HtmlLogger.java:89)
at com.stoneware.swconsole.SWLog.service(SWLog.java:35)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)
....
Since I am stopping the Jetty instance, shouldn't it whack all of those
threads that are busy servicing clients at the time?
Thanks
Tony
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from Stoneware, Inc.
may be monitored.