• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SingleThreadModel

 
ashok khetan
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True or False:
A servlet implements SingleThreadModel interface. The servlet container may run multiple threads on its methods.
 
Gagan Indus
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will go for False
( if it would have been 'service() method' in place of 'methods' , then there would have been no doubt about "false" )
anyway , have a look at servlet-spec 2.2.1
------------------
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .
 
Tim Duncan
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A container can only run one thread per instance of a servlet which implements SingleThreadModel. However a container may create more than one instance of the servlet. It depends on the particular server -- some do maintain a pool of servlet instances for efficiency.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic