Re: multithreading

Zoltan Szalay <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <1059145952.22609.10.camel@maldoror>
If your servlet implements SingleThreadModel the container will take the
responsibility to do synchronization. So you can be sure only one thread
will execute e.g. the service() method at a time.
Otherwise when you access or mutate the servlet instance/static fields
from inside the service() method, you must protect your fields from
concurrent access with synchronized blocks.

Zoltan Szalay

On Fri, 2003-07-25 at 16:54, Shivanjali Bhutkar wrote:
> I would like to know about multithreading in servlets.
> Is the SingleThreadModel used when mutlithreading or not? If no then what's
> the purpose of it and what is generally done when servlet is used by many
> concurrent users at same time.
> thanks
>
> ___________________________________________________________________________
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.