tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: How can Servlet detect lost of connection to client?
Date Sat, 27 Sep 2008 22:14:13 GMT

agreed.. I would definitely try that solution first

also you may want to use a different connector (such as NIOConnector..) that supports Events
if you keep in mind your client's browser will not display anything until the entire request
is complete. so write a client application for your cometProcessor, to test how it works
details at
http://people.apache.org/~fhanik/http.html

a rather elaborate example is located here
http://www.ibm.com/developerworks/websphere/library/techarticles/0809_vamsi/0809_vamsi.html#15.Creating%20an%20NIO%20Connector|outline

realising the asynchronous event model uses the comet processor
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/CometProcessor.html

a more complete example is available here
http://stackoverflow.com/questions/109294/are-writes-from-within-a-tomcat-6-cometprocessor-non-blocking

filip and bill have been doing the most work on this Processor so i would ping them for more
information..

Dziekuje
Martin
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender.
This transmission is of a confidential nature and Sender does not endorse distribution to
any party other than intended recipient. Sender does not necessarily endorse content contained
within this transmission. 


> Date: Sat, 27 Sep 2008 23:21:00 +0200
> From: miki@ceti.pl
> To: users@tomcat.apache.org
> Subject: Re: How can Servlet detect lost of connection to client?
> 
> Ming Deng wrote:
> > If a client HTTP request takes some time to process on the servlet side, it
> > is possible that the Tomcat can lose connection to the client in the middle
> > of this processing time, due to various reasons, for example the client
> > quit. How can servlet detect such event so it can terminate the server side
> > processing which is not needed any more
> I believe that the only way is to receive IOException while writing to 
> respone.
> 
> -- 
> Mikolaj Rydzewski <miki@ceti.pl>
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message