Adam Gifford wrote:
>
> Hi, while debugging some servlets of mine, i noticed in the jserv.log
> that it appears to init/destroy 5 copies of our SingleThreadModel
> servlets simultabeously. Is this the designed the way it is supposed to
> behave? i would tend to think that instead of doing this it would be
> better to start the objects as needed? Or am i completely mistaken?
>
It's designed to go that way...
We create five instances of any SingleThreadModel servlet, to have it
ready when requests come in, and to save time then. If you have a looong
"init" method in your servlet (like connecting to a JDBC database, or
reading and parsing a file), the init method is called before the
request comes in, so having a faster response time...
Pier
--
Pierpaolo Fumagalli - Java Apache Project - <http://java.apache.org/>
E-Mail <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]>
---------------------------------------------------------------------
----------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]