It is not correct to assume that there is only one instance of a
singethreadmodel servlet and requests are serialized. Many engines do
instancepooling in order to improve effiencieny, so you can handle as
many requests concurrently as you have instances. However, the strategy
to build up and reduce the pool might be different from engine to
engine.
In jo! e.g. you can set the max number of instances, but the pool is
never reduced.

cheers,

-hendrik
- - - - - - - - - - - - - - - - - - - - - - - - - - -
  tagtraum industries      http://www.tagtraum.com/
  jo!                 small&smart 2.1 servletengine
  Java Server & Servlets    The German servlet book
  The WebApp Framework        http://www.webapp.de/



Siros Supavita wrote:

>
>
> 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

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to