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.
Actually, I was thinking the Thread#join would be better since we could be in an infinite loop not doing any calls to wait() or sleep(). I was thinking of implementing a scheme sort of like this:
mod_jk | tomcat -----------+---------- PING --> received received <-- PONG [ sleep ~2 seconds ] received <-- PING PONG --> received
If any side sends a PING and doesn't hear a PONG in 0.1 seconds, it can assume the other side is "dead". This would mean a there would need to be a separate thread in the tomcat that is simply doing housekeeping or "watch dogging" on the status of the connections.
This won't work well on the Tomcat side due to Garbage Collection. the JVM will often freeze Tomcat for > .1 seconds during GC. And when doing a Full GC can freeze Tomcat for many seconds.
Regards,
Glenn
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]