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

Will SingleThreadModel be in the Real Exam ?

 
muthu moorthy
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HF Book, in the page 201, its mentioned that SingleThreadModel wont be in the Real Exam.

Can any body make sure ?

thank you
 
Sayak Banerjee
Ranch Hand
Posts: 292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It won't be there on the exam, but just learn the ill effects of it.
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes just remember this

1. the page attribute has a attribute called "isThreadSafe"
default vaue is "true", which means, my servlet is thread safe
and i dont want you (the container) to implement the single thread
model. this model is evil as it is like kissing off a good bye
to the concurrent requests that your servlet can serve. this is because
when your servlet implements the single thread model, it ensures
that only one request thread runs throug your servlet, and this
violates the basi idea of a servlet - servcing multiple requests
2. if the servlet implements single thread model, the container, may
go ahead and create multiple instances of a servlet,in case it gets many
requests.

hth
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic