Hi Ravi,
You can take the advantage of using database connection pool services, which
comes with the application server. This way the application server will
aloow you to set the connection time out property.
Always write a finally block which will close the connection, statement,
resultset objects in your code.

cheers
raju
----- Original Message -----
From: "V.T.R.Ravi Kumar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 26, 2003 9:40 AM
Subject: How to close database connections.


Hi friend,

I have some web reports developed which accesses my database and displays
the result as a webpage.
The thing is if due to some reason the query got stuck and caused delay then
if the user closes the window the connection remained unclosed.  Although i
have set time out in the database server .
I would like to know if the server could sense if the sessions has been
closed and close their database connection.


thanks


----------------------------------------------------
        V.T.R.Ravi Kumar
Engineer,CCX,BHEL, Haridwar
Phone : Office-91-01334-285260
             Res  -91-01334-226121
-----------------------------------------------------

=========================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to