On Tue, 10 Aug 1999, Tim Crook wrote:

> I have tried using Jason Hunter's example 9-8 as a model for
> managing database connections with sessions. I am running my
> servlets on Apache 1.3.6 with JServ 1.0 module, JDK 1.2.2 and JSDK
> 2.0. I find that the method implementing
> HttpSessionBindingListener.valueUnbound is NOT being called, unless
> I invalidate explicitly my session. I was under the impression that
> upon leaving my browser my session would automatically be
> invalidated and hence my database connection would be closed when
> valueUnbound was called, but its not being called. Do I need to
> override the session identifier's expiry? Any ideas?

It's not clear what you mean by "leaving my browser", but if you mean
exiting it, the server can't know when that happens -- that is the
nature of the HTTP communication.  So that along won't cause session
invalidation.  That can only be brought about two ways (I believe), an
explicit invalidation or a timeout.  So, you probably want to set the
session timeout to something that makes sense for your application.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
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