tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: multiple servlets created with load-on-startup!=0 ?
Date Thu, 15 Jun 2000 16:33:16 GMT
Jay Sachs wrote:

> Under Tomcat 3.1 as a standalone java servlet container, if I specify
>    <load-on-startup> some non-zero value </load-on-startup>
> for a servlet in my web.xml file, Tomcat is constructing and init()-ing
> multiple copies of the servlet. The exact number varies between 3 and 5;
> I can't detect a pattern. Leaving the tag out, or specifying 0 for the
> content of the element yields exactly one servlet being constructed.  Is
> this expected behavior? If so, why?

Does your servlet implement SingleThreadModel?  If so, it is legal (but not
required) for the servlet container to create more than one instance (how many
depends on how you configure the instance pool stuff).  Otherwise, it should
only create one instance per <servlet> definition.

> jay

Craig McClanahan

View raw message