• Post Reply Bookmark Topic Watch Topic
  • New Topic

Whiz Labs Quesion  RSS feed

 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q: Which of the following is the simplest way of making a servlet thread safe.

Options:
a. Implement SingleThreadModel
b. Implement ThreadSafeModel
c. By maintaining a pool of servlets.
d. None of above.
Whiz labs answer: A.
My answer D. Making the servlet implement SingleThreadModel does protect servlet instance variables but what about Servlet Class variables. Hence my answer was D.
Please clarify. Can we expect such questions for exam.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are correct
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!