Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it mandatory (request thread).

 
Inocencio Oliveira
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Mateus Lucio
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
vani venkat
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can we have many instances of single servlet in one JVM?
 
Prasad Kumbhare
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
vani venkat
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ooh, got it. thanks prasad.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic