1. If u are having instance variables i.e member variables of servlet class
and not implementing the SingleThreadModel interface then these variables
are shared during various invocations of the same servlet. To avoid
concurrent access of these variables u can either make the code thread safe
by using java synchronized keyword or implement the SingleThreadModel
interface.
2. Since local variables in class methods come into existence only when the
method gets called, they will be created fresh for each method call.
--Mukul Gandhi
At 05:52 AM 7/6/99 -0700, Jeetandra Mahtani wrote:
>Hello,
>Can someone please confirm the following and maybe provide some insight to
make my
>concepts thorough..
>If there are no instance variables and only local variables, one does not
need to worry
>about different threads accessing the same variable, right?
>If only local variables are being used in all classes, does one need to
worry about
>synchronization/thread issues?
>When does one need to use the SingleThread Model ?
>Thanks for any information..
>J
___________________________________________________________________________
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