If you're not making updates (directly, or indirectly via calls to
mutating methods, or I/O) then clearly there's no way for threads to
interfere with one another. Of course, if even one thread can mutate the
data structures, there needs to be synchronisation.
> -----Original Message-----
> Really. I wouldn't have expected to. For example if I had a Servlet such
> as
>
> class TestServlet extends HttpServlet {
>
> private String instance1 = "never to be assigned again";
> private final static String instance2 = "never to be assigned again
> too";
>
> ...
>
> }
>
> I would have to call synchronize(this) every single time I needed to
> access
> instance1 and instance2? How could this be (I'm only accessing and never
> setting)? Could you explain?
>
___________________________________________________________________________
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