• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

page 220 Question 13

 
michelle Wang
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,I'm not understand about the page 220 Question 13,what' the difference between "create instance of servlet in the same JVM(option B)",and "create instance per JVM(option C)".
So if servlet implement SingleThreadModel, the container will create multiple or single instance of the servlet in the same JVM? the container will create multiple or single instance per JVM?
Some one can give me a guide? Thanks a lot!
 
sundar katluri
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
option B describes wrong statement
-- all it says is container will create multiple instances in a JVM
if it is not implement Single Thread Model( --> wrong )

Option C describes correctly
-- no more than one instance is allowed per JVM if servlet does not
implement single thread model
(remember if your web app is distributed it is possible to have
multiple instances of servlets exist per JVM even it deos not implement Single Thread Model --> that is the special case though)

Hope this helps


thanks
vishnu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic