• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question 42)

 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 42)
Which statements are correct about servlets implementing the SingleThreadedModel interfaces
1) Only one thread at a time will acces the service method
2) The servlet container may decide to create a pool of the servlet instances
3) The member variables are thread safe
4) none of the above

author's answer is 4), but I think 1) and 2) are correct. please correct me if I am wrong, thanks
 
g madhava
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lee:
You are right with your choices. The author is wrong.
 
Rishi Yagnik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hell friends
I think only (1) is correct how it can be (2) ans is correct pls explain me
Rishi
 
Mikalai Zaikin
Ranch Hand
Posts: 3381
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
you guys should carefully read the question one more time:
SingleThreadedModel is not the same as SingleThreadModel.
cheers
 
riohk kurn
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this question is a trick (spelling), I don't think it will be tested in real exam.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!