Look at the HttpSessionListener interface in the servlet API.
Sam
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Mark
> Foley
> Sent: Sunday, September 19, 1999 10:29 PM
> To: [EMAIL PROTECTED]
> Subject: Releasing Native resources
>
>
> Hi All,
>
> We are using a third party native library called from our
> servlets. We must
> call an instantiation function within the library for every thread which
> uses the library, and call another function to release the instance data
> when we are finished, otherwise the system just gets clogged up
> with library
> instances.
>
> Our problem is that we can create new instances of the library when a new
> Session object is created, but we do not know how to detect the
> session has
> expired (unless the user 'logs out') in order to release the library
> instance. Does anybody know how to do this?
>
> We are using the JNI to access the library functions. Our setup is IIS 4
> running on Win NT4 server, SP5, with IBM WebSphere 2.02 and Sun JDK 1.1.8.
>
> Thanks,
> Mark Foley
> EDS (Australia)
> e-mail: [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
>
___________________________________________________________________________
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