| Author |
Servlet Instance
|
sai prasanna
Ranch Hand
Joined: May 02, 2005
Posts: 167
|
|
Hai all If i had a servlet and 100 clients are requesting that servlet how many instances are created ? According to my analysis init() method is initialized once and the service() method executes for each clients request so the servlet has one instance serving 100 clients. thanks in advance
|
 |
Sunny Kumar
Ranch Hand
Joined: Oct 27, 2005
Posts: 57
|
|
|
Only one instance is created and any new request by client generates a new thread which handles the client requests.
|
<a href="http://lifesmind.blogspot.com/" target="_blank" rel="nofollow">My Blog</a>
|
 |
ramprasad madathil
Ranch Hand
Joined: Jan 24, 2005
Posts: 489
|
|
This is container specific. A container may choose to have, say, 50 threads per instance and when the number of current requests exceeds that, may create another instance. The exact number of instances and thread per instance is not cause for concern. Ram.
|
 |
 |
|
|
subject: Servlet Instance
|
|
|