>From the doc --

"
public abstract interface SingleThreadModel

Defines a "single" thread model for servlet execution. This empty interface allows 
servlet implementers to specify how the system should handle concurrent calls to the 
same servlet.
If the target servlet is flagged with this interface, the servlet programmer is 
guaranteed that no two threads will execute concurrently the service method of that 
servlet. This guarantee is ensured by maintaining a pool of servlet instances for each 
such servlet, and dispatching each service call to a free servlet.

In essence, if the servlet implements this interface, the servlet will be thread safe.
"

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Kevin
Mukhar
Sent: Wednesday, February 09, 2000 10:32 AM
To: [EMAIL PROTECTED]
Subject: Re: AW: Servlet Life Cycle


Stein wrote:
>
> The server creates only ONE instance per servlet class
> (unless Your servlet does not implement the 'SingleThreadModel'
> flag interface).

Isn't the above backwards?

If your servlet does NOT implement SingleThreadModel then there is a ONE
instance of the servlet per server

If your servlet does implement SingleThreadModel there will be multiple (number
is implementation dependent) instances of the servlet per server.

K Mukhar

___________________________________________________________________________
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

___________________________________________________________________________
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