Originally posted by sudhir nim:
If a servlet is implementing SingleThreadModel thn container will synchronize access to service()
No, this is one way in which it can be implemented.
From the API:
The servlet container can make this guarantee by synchronizing access to a single instance of the servlet, or by maintaining a pool of servlet instances and dispatching each new request to a free servlet.
Whatever the case, container guarantees that only one thread is accessing service() method at a time.
It is irrelevant, I think programmer doesnt need to know weather container is
synchronizing the access or maintaining the pool.
[ November 05, 2007: Message edited by: sudhir nim ]