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!
michelle Wang <br />SCJP 1.4
posted 12 years ago
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
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads