| Author |
Is it mandatory (request thread).
|
Inocencio Oliveira
Greenhorn
Joined: Oct 13, 2005
Posts: 23
|
|
|
I read that the container creates for each request captured a thread. I know that one thread is generated to handle one Servlet instance, if you have ten started Servlets and all up, so you got one thread for each Servlet started, but for each request do you have addicional threads running?
|
<b>Keep your mind flowing away!</b>
|
 |
Mateus Lucio
Ranch Hand
Joined: Jul 27, 2006
Posts: 57
|
|
|
Yes, assuming that you have 10 diferent servlets in your webapp then the container will create/allocate 1 thread per request, independently of what servlet will serve that request.
|
Studying ...
|
 |
vani venkat
Ranch Hand
Joined: Nov 21, 2006
Posts: 142
|
|
|
how can we have many instances of single servlet in one JVM?
|
SCJP 1.4, SCWCD 1.5
|
 |
Prasad Kumbhare
Greenhorn
Joined: Oct 18, 2007
Posts: 26
|
|
Vani,
To answer your questions, if servlet implements Single Thread Model then vendor can implement STM by creating multiple instances of servlet and make sure that every sevlet instance creates only one thread at a time.
Thanks.
Prasad
|
Thanks,
Prasad Kumbhare
SCJP 5.0, SCWCD 5.0, SCBCD 5.0
|
 |
vani venkat
Ranch Hand
Joined: Nov 21, 2006
Posts: 142
|
|
|
ooh, got it. thanks prasad.
|
 |
 |
|
|
subject: Is it mandatory (request thread).
|
|
|