Hi,
I don't think your understanding is correct: the container may allow
multiple threads to use the same servlet instance concurrently.  If you
need synchronization around or within that method, or around some fields
in your servlet class, you are responsible for it.

The container does guarantee that only one thread will process a request
from start to finish, i.e. the same thread will invoke any filters,
servlets, etc. for the same request.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Keith Hankin [mailto:[EMAIL PROTECTED]
>Sent: Monday, June 14, 2004 10:53 AM
>To: Tomcat Users List
>Subject: Multiple requests sharing the same Servlet instance
>
>I am having a problem where one Servlet instance seems to being used by
two
>different threads at the same time. It is my understanding that Servlet
>instances will not be used by two threads at the same time, so that the
>service() method would thus only be called by one thread, then it can
be
>called again if the Servlet instance is reused by way of pooling.




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to