"Neil Aggarwal" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello:
>
> I have a couple of questions about the way Tomcat uses threads:
>
> 1. If a thread does an infinite loop or other operation that
> would cause it to wait forever, will Tomcat kill it?
> If not, is there a way to do that?
> If so, how would we control the timeout?

Eventually the browser will drop the connection, and then if the Servlet
tries to write anything, then an IOException will be thrown.  However
allowing the following code on your server will DoS:
  while(true) {
     Thread.Sleep(1000);
  }


>
> 2. Is there a hard limit on the number of threads like in
> Apache or does it allocate up to maxProcessors no matter
> how large it may be?
>

The thread allocation is pretty similar to Apache/httpd.

> Thanks,
> Neil
>
>
> --
> Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
> FREE! Valuable info on how your business can reduce operating costs by
> 17% or more in 6 months or less! => http://newsletter.JAMMConsulting.com




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to