kavitha ramasamy wrote:

> The value unBound is called only at two places
> 1)when I am reloading the same session
> 2)when the session expires.
>
> My problem is if the user closed the browser window , I need to release the
> resource relevant to that session which I created at the time of opening.
>
> I cannot even invalidate my previous session because the intention of this
> work is to prevent multisession on the same user.
> If the user had a session, he cannot opened the next session.so the resource
> should be released once the browser closed(clint exit)
>

A session in the servlet API has no direct relationship with whether the user
has closed their browser or not.

There have been multiple long and involved chains of messages on this topic over
the past few weeks.  I suggest you scan the mailing list archives
(http://archives.java.sun.com) for more details.

The upshot of these threads is that there is no 100% reliable way to catch every
possible case like this, because HTTP is a stateless protocol.  About the best
you are going to be able to do is use some sort of JavaScript "onUnload" event
handler on your pages, and have it send a message to your application when the
user leaves your site.  You still won't be able to catch cases like when a
user's browser or PC crashes and they try to get back on, so you will still need
the timeout to catch those cases.

>
> Thanks and Regards
> kavitha
>

Craig McClanahan

___________________________________________________________________________
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