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: [EMAIL PROTECTED]
> 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 <[EMAIL PROTECTED]>
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_________________________________________________________________
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/

Reply via email to