Thanks to all who replied to this query.
Simon, I didn't want to use an 'InstancePool' because the initialisers for
each instance are unique for each session's use of the library. That would
be my preferred solution if this weren't so.
Sam, did you mean HttpSessionBindingListener instead of HttpSessionListener
(as Chris suggested)? HttpSessionBindingListener looks like the way to go.
Thanks again,
Mark
> -----Original Message-----
> From: Simon Christian [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, September 20, 1999 8:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Releasing Native resources
>
> Mihgt it be possible to use an 'InstancePool' object similar to the
> database
> ConnectionPools frequently mentioned in this mailing list? If possible,
> that
> would probably be a more efficient way to deal with it.
>
> - simon
>
> Mark Foley wrote:
>
> > 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