There is no notion of 'client is no longer using the services' because once
every request is over you can say that 'client is no longer using services'.
It doesn't much matter (except for the session timeout) if the client makes
another request 5 or 5 hours later.

So, yes, the only way to 'fix' it is to set a time-limit for a session being
inactive.  Other thing to do is not to tie any connections to external
resources to the client.  Use connection pooling.

As for time out period of your session.  This varies depending on what you do.
For example my web-based e-mail account has unlimited time (it probably isn't a
servlet but just to illustrate).  I can start it today and have the page open
overnight, come back next morning, click get mail and it works.  But for online
trading or banking you would probably set the time out to less than infinity.

dave.

"Gupta, Lokesh" wrote:

> So what are the possible ways for you to detect on the server side that the
> client is not longer using the services. Is that usually done using some
> kind of a time-limit since the last hit on the servlet? If yes, are there
> any recommendations regarding what these time-limits should be?
>
> Thanks,
>
> Lokesh
>
> -----Original Message-----
> From: David Mossakowski [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 17, 1999 10:26 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How to know a brower closed
>
> There is no way to know that.
>
> To release resources use HTTP binding listener and implement the unbind
> method.  There you can release the resources because when the session is
> expired this method is called.
>
> dave.
>
> Joe Lei wrote:
>
> > Hi there
> >
> > is it possible to notify a servlet from the client side (using
> JavaScript/applet to servlet communication or else) when the user close the
> brower (without explicitly logout) so that the clean up process, like
> closing db connection, invalidating session object etc. can be triggered.
> >
> > If there're any alternative, pls suggest.  Thx
> > Joe
> >
> >
> ___________________________________________________________________________
> > 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
>
> --
> David Mossakowski              [EMAIL PROTECTED]
> Programmer                           212.310.7275
> Instinet Corporation
>
> "I don't sit idly by, I'm planning a big surprise"
>
> ___________________________________________________________________________
> 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

--
David Mossakowski              [EMAIL PROTECTED]
Programmer                           212.310.7275
Instinet Corporation

"I don't sit idly by, I'm planning a big surprise"

___________________________________________________________________________
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