awarnier wrote:
>
> aaime74 wrote:
> ...
> Hi.
> Kind of restarting from the beginning, I think that the first question
> to ask is whether whatever method which actually does the rendering of
> the maps, and which is "heavy" in terms of resources, is capable of
> being interrupted cleanly in the middle. Is it capable itself of
> checking regularly if it should continue doing the work ? Or else, if
> you "shoot it down" does it mop up after itself, or does it leave stuff
> to clean up all over the place ?
>
I can cleanly stop the rendering process in almost any point of it.
The issue is not stopping it, it's detecting the client connection
was dropped.
No matter what solution is adopted, one still depends on the ability
to detect the client has dropped the connection, something that no
one so far described how to check (I'm starting to wonder if there
is a way at all).
awarnier wrote:
>
> The "(whenever possible)" above refers to the fact that a number of
> things outside of your control can come in the way of such detection :
> proxies, firewalls and the like. If the ultimate client breaks the
> connection, it is not guaranteed that Tomcat itself would notice this
> right away.
>
Ok, but let's say Tomcat is capable of that. How does one check from
within the servlet that the connection has been dropped without writing
out anything? What I've tried so far is trying to block on the input stream
provided by the Http request and hoping it would throw an exception if
the client drop the conntection, but that does not work, the input
stream just return -1 to any "read" operation no matter if the client
is still connected or not.
Cheers
Andrea
--
View this message in context:
http://www.nabble.com/How-to-check-if-the-client-dropped-the-connection-tp25641481p25658980.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org