Title: RE: Servlet Life Cycle - Single Thread Model

Hello all,

If servlet implements SingleThreadModel, it means that it will serve only 1 request at a time. All other request must have to wait for that servlet to finish the first request (like the way synchronization do). It'll never create new instance of requested servlet to serve the request. Then if servlet A implements SingleThreadModel and there're 10 request to servlet A. The requests must be handle in serial order with only 1 instance of servlet A. (It has no different from general servlet except that it can handle only 1 request at a time)

In other case, servlet never unload (I think in every servlet engine) except that servlet engine allow you to unload it manually (WebLogic can).

Hope this helps,
Siros

> -----Original Message-----
> From: Joe Lei [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 08, 1999 4:46 PM
> To: [EMAIL PROTECTED]
> Subject: Servlet Life Cycle - Single Thread Model
>
>
> Dear Wisers
>
> I've a question on SingleThreadModel Servlet.
>
> In a non-SingleThreadModel, Servlet instance need not to be
> reloaded (or killed) until the engine restart or old version
> of servlet is replaced.
>
> How about servlet implements SingleThreadModel, is the
> servlet instance being clean up after the invoked thread
> stops?  If not, does it mean the no. of servlet instance
> remains in the highest watermark of the instances invoked?
> (For example, if 10 instances has been invoked in earlier
> time at the same instant, even though only 5 users is now
> connected, the no. of servlet instance still remains in 10?)
>
> Thanks
> Joe

Reply via email to