Can anyone please tell me where can i specify the size of pool for the servlet.
Thanks in advance.
Actually, container doesn't really do pooling for servlet instances. There is a seperate thread for every request entertained by the same servlet instance. Container might create multiple instances of a servlet when it like to. You need not bother with this thing.
SRV.2.2.1 Note About The Single Thread Model
The use of the SingleThreadModel interface guarantees that only one thread at a
time will execute in a given servlet instance's service method. It is important to
note that this guarantee only applies to each servlet instance, since the container
may choose to pool such objects. Objects that are accessible to more than one serv-
let instance at a time, such as instances of HttpSession, may be available at any par-
ticular time to multiple servlets, including those that implement
It is recommended that a developer take other means to resolve those issues instead
of implementing this interface, such as avoiding the usage of an instance variable or
synchronizing the block of the code accessing those resources. The
SingleThreadModel Interface is deprecated in this version of the specification.