Why not using the session.invalidate()?? This will close the
session immediatly and call the unbound functions.
Another point is that destroy is called when the servlet is taken off
the memory (for reloading purpose for example) and not at the end of a
session??? Are you sure of the use of destroy method?
Friendly,
Jean Michel Augusto
[EMAIL PROTECTED]
> -----Original Message-----
> From: Andrey Sazonov [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 10, 1999 16:33
> To: [EMAIL PROTECTED]
> Subject: How to cleanup user data in sessions?
>
>
> Hi all there!
> I have following problem and I hope somebody can help me.
> I've developed servlet that stores user data in the http session.
> When destroy() method for this servlet is called, I want to perform
> cleanup for this user data. I can't wait until sessions expirations,
> because there is quite specific object that is responsible to maintain
> connection to another server in user data I've stored in the
> session, and
> this is why I want to invalidate it manually( and so close
> connection).
>
> The main problem, that I'm unable to get SessionContext in
> the destroy()
> method to obtain list of sessions.
> Does anybody know how may I do this? The only way I see is to maintain
> additional
> list of objects placed in the session within my servlet, but
> It seems to be
> ugly a little :)
>
> ---------------------------
> Sincerely
> Andrey Sazonov,
> ([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