Saikat Chatterjee typed the following on 01:25 PM 1/23/2001 +0530
>            I have a question regarding Tomcat. Does Tomcat implements the
>servlets as SingleThreadModel or MultipleThreadModel?

Both. According to the servlet spec, by default servlets allow multiple threads,
so multiple users can be processed at the same time. If you configure your
servlet to be singlethreaded it will only handle one user at a time. A server can 
then create a pool of servlets to handle multiple requests, but Tomcat doesn't,
so using the single thread model means your servlet will be very slow if very many
people use it.

The reason Tomcat doesn't implement pooling for single threaded servlets is that
it's much more resource intensive than just using a single servlet with multiple
threads - your server would need more RAM, possibly more CPU, faster disk 
access, etc. to handle the same level of traffic. It's much better to take a little
bit of time to understand the concurrency issues and code carefully.

Kief


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

Reply via email to