On Tue, 19 Mar 2002, Anthony Eden wrote:

> Date: Tue, 19 Mar 2002 12:45:12 -0500
> From: Anthony Eden <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: Creating threads from a servlet
>
>
>
> > -----Original Message-----
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 19, 2002 12:15 PM
> > To: Tomcat Users List; David Shanahan
> > Subject: Re: Creating threads from a servlet
> >
>
> <snip>
>
> >
> > A couple of notes about using your own threads in servlet containers:
> >
> > - You must properly clean up your threads when the application
> >   is shut down.  If you don't, you are very likely to cause
> >   Tomcat to hang at shutdown time.
>
> What exactly do you mean by "properly clean up your threads"?  I believe
> I am seeing this behavior in some of my systems and I am interested in
> fixing it.  Does this mean that the application must listen for some
> sort of shutdown notification?
>

If you start a thread but never stop it, Tomcat shutdown will hang (unless
the thread was started as a daemon thread).  Somewhere in the shutdown
code of your application, it should stop all the background threads that
were started.

> Sincerely,
> Anthony Eden
>

Craig


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to