You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Craig R. McClanahan" <Cr...@eng.sun.com> on 2001/03/02 20:51:48 UTC
Re: SingleThread
James MailingList wrote:
> If a Servlet implements SinglThreadModel interface then how does the Tomcat v3.2.1
> handle it ?
> a. Creates multiple threads as and when the request comes and kicks off the
> multiple instances of the servlet. If YES, then can we configure how the Min/Max
> threads to be created ?
> b. Creates a single thread and serves one request at a time while putting others
> in a queue ?
> c. Or does it handle in some other way ?
>
(c). It doesn't create another thread, but it does a synchronized call to the
service() method of the one and only servlet instance.
IMHO using SingleThreadModel is a very bad idea, because it leads you to believe that
you do not have to worry about any threading issues, but that is not true.
>
> Yours Servlet Friendly,
> Walter G. Prabhakar.
>
Craig McClanahan