Yes, I know I could do things with connection pooling, but I want different
users logged in as their real user ids, not using a dummy user everyone
uses.
Is it a good idea to tie a cookie with a life time of -1, set to the session
id and when the browser process is terminated (no ambiguity!), the session
associated with the cookie would be invalidated?
-----Original Message-----
From: jon * [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 10, 1999 4:07 PM
To: [EMAIL PROTECTED]
Subject: Re: Session problems with Java Servlet
Programming Book...
> 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?
Wrong. Sessions are expired by the servlet engine or when
you close them.
How does the servlet engine know that you have closed your
browser?
Also, why are you trying to store a database connection in a
session? That
is crazy. ;-) Use a connection pool instead. I have one
implemented in Dash
that is quite cool cause it uses the Singleton methods to
cache
connections...
<http://www.working-dogs.com/dash/cvsweb/index.cgi/dash/com/workingdogs/dash
/util/db>
-jon
___________________________________________________________________________
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