tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: How do I listen for threads starting and stopping?
Date Thu, 29 May 2003 05:00:56 GMT
The simplest (portable) way to do this is to pretend that Threads are the
same as Requests, and use request.setAttribute("foo",bar).  These will
automatically be discarded (i.e. eligible for GC) at the end of the Request.
If you need to do explicit cleanup, then you have to wait for TC 5.x, which
has RequestListeners to tell you when the Request starts and ends.

"Kenneth H. Cox" <> wrote in message
> I have some per-thread data that I need to dispose of
> when Tomcat connector thread goes away.  I'm using the
> Coyote Connector.  Is there a way to do it?  A Tomcat-specific
> mechanism is just fine for now, thank you.
> I found HttpConnector.addLifecycleListener(), but all the
> methods are marked deprecated and I'm not sure how to get at the
> HttpConnector in the first place.
> Any pointers in the right direction would be greatly appreciated.
> Regards,
> kenstir
> --
> Using M2, Opera's revolutionary e-mail client:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message