Howdy, I'll confirm that, not because of a tomcat limitation but because of the HTTP protocol being stateless. How would java.nio help you here?
Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Trott, David [mailto:[EMAIL PROTECTED] >Sent: Thursday, December 11, 2003 11:15 PM >To: '[EMAIL PROTECTED]' >Subject: Detecting HTTP connection state in Tomcat 4.x > >Hi > >I have a batch transaction that takes a significant amount of time (more >than an hour). >However I have a requirement that the user needs to be able to kick of the >transaction from a web interface and be notified when it completes. > >I know this isn't the best way to solve the problem, but I was wondering if >it would be possible to detect the HTTP connection state from tomcat 4.x. >I.e.: I kick off the batch transaction from a Servlet and wait for either: > >- The transaction to complete at which point I notify the user. >- The http connection is closed (The browser gets closed), at which point I >cancel the batch transaction. > >NOTE: The reason I am canceling the transaction is because it is expensive >to calculate. > >I suspect that it not possible to detect the connection state because >Tomcat >4.x only requires JDK 1.2, hence it cannot be using NIO. >As a result there are no methods to "reliably" detect whether the >connection >is still open without reading or writing the connection. > >However if someone could confirm my assumption (that it is not possible to >detect the state) it would be much appreciated. > >Thanks, >David > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]