tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <matthias.er...@coremedia.com>
Subject Re: mod_jk timeout?
Date Mon, 27 Oct 2003 12:45:37 GMT
On Mon, 27 Oct 2003, Henri Gomez wrote:

> If the thread on java side is a long running task or a blocking task,
> it should be handled by the servlet engine and sus some watchdog support
> should be added in Tomcat.
>
> In you're exemple I didn't know how the thread could be ever finished !!!

In theory, that's what Thread#interrupt is for. It asks the thread to shut
down, resulting in setting the #interrupted flag / an InterruptedException
on potentially blocking calls such as wait() or sleep(). One could
interrupt named jsp like that.

However, dealing correctly with InterruptedExceptions is hard (you should
leave your objects in a meaningful state) and since InterruptedException
also is a checked exception, many people choose to
catch(InterruptedException ie) {}, even(?) Sun ORB code does so (not to
speak of my own).

Those threads are inevitably lost.


Matthias
-- 
Matthias Ernst
Software Engineer

CoreMedia - Smart Content Technology


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message