Me thinks you do not understand HTTP.  And I'm not sure what you mean by the
"'right way to handle it' as opposed to the Servlet specification."  Is
there a difference?

Anyhoo, the standard method of not committing a confirmed transaction is
called a "rollback" and it's available from both your JDBC driver and your
database (I think even MySQL supports transactions now), but this has
nothing to do with the Servlet specification.  You need something like
White, et al, "JDBC API Tutorial and Reference, 2d ed.," (Addison Wesley
1999).  Although dated, it remains an invaluable desktop reference.

Mark

-----Original Message-----
From: Neel Narayan [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 7:10 PM
To: [EMAIL PROTECTED]
Subject: Clients that disconnect after inovking a servlet


What should be the servlet behavior when clients close the connection after
invoking a servlet? I ask this question more from the perspective of the
"right way to handle it" as opposed to the Servlet specification.

Let's say a client has invoked a servlet that opens a DB transaction and
then hits the stop button on the browser. This causes the connection to end.
The user intent here is to prevent the transaction from happening - but the
servlet of course does not know this and commits the transaction and will
realize that the connection is broken when it's time to respond.

How is this problem typically handled? Should I continuously check to see if
the connection is alive?

Please comment.

Thanks,
Neela

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to