Ron Sigler wrote:

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

Only in the most trivially simple cases is this statement correct.  You still need to 
be very aware that you are operating in a multi-threaded servlet environment.  This is 
one of the biggest gripes I have about the very existence of the "SingleThreadModel" 
interface -- it misleads people into a false sense of security
that they don't have to worry about multithreading.

Craig McClanahan

___________________________________________________________________________
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