This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question ID :1000056254950

 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question ID :1000056254950
A servlet implements SingleThreadModel interface. The servlet container may run multiple threads on its methods.
the answe is false.I think the container can create instance for the servlet, maybe, there are multiple threads on the methods of different instance. please correct me!
 
Sonal Magapu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree the answer is false. One cannot create threads for the methods on servlets that implement single thread model
 
Barry Kushnir
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is a little vague. A servlet container can create multiple instances for a servlet that imlpements the SingleThreadModel, OR the container may create just one instance, and sychronize access to the servlets service method.
If the service method is synchronized, The servlet container may run multiple threads on its methods, but only one at a time in a queued fashion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic