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]

Reply via email to