You can tie the connection cleanup to the loss of the session. So, when you
user logs in, you establish a session object and store the connection object
with it. When the user logs out or the session times out, you can listen
for that through the HttpSessionBindingListener and make sure the open
connection isn't orphaned.
Cheers,
Dan
--
Daniel Kirkdorffer
NACN IS: 425-580-6225
Sr. Consultant, Syllogistics LLC
Email: [EMAIL PROTECTED]
Web: http://www.syllogistics.com/
> ----------
> From: Imam, Asim, CFCTR[SMTP:[EMAIL PROTECTED]]
> Reply To: Imam, Asim, CFCTR
> Sent: Thursday, August 26, 1999 2:44 PM
> To: [EMAIL PROTECTED]
> Subject: Database Connections Cleanup????
>
> Hi All,
>
> I have developed a simple query tool using JSP and JavaBeans. The user
> logs
> in and a queryBean is instantiated and the connection is made to the
> database. I have an end session button which closes the DB connection but
> if
> I dont use that my connection remains open as well as the bean is still
> left
> instantiated...even if I close the browser the connection still stays
> there... until I stop and start the jswdk server again....Where can I do
> this kind of cleanup for JSP/Servlets??? Or is it possible using
> JavaScript?? I have set the scope of queryBean to be session...do I need
> to
> change it to something else???
>
> Here's some info on my environment:
>
> WINNT4.0
> JSWDK 1.0
> JDK 1.2.2
> Oracle 8 Db
>
> Thanx
>
>
> Asim Imam
> Application Developer
> @AT&T Tax Systems Group
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html