• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question ID :1000056254950

 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Question ID :1000056254950
A servlet implements SingleThreadModel interface. The servlet container may run multiple threads on its methods.
the answe is false.I think the container can create instance for the servlet, maybe, there are multiple threads on the methods of different instance. please correct me!
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree the answer is false. One cannot create threads for the methods on servlets that implement single thread model
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The question is a little vague. A servlet container can create multiple instances for a servlet that imlpements the SingleThreadModel, OR the container may create just one instance, and sychronize access to the servlets service method.
If the service method is synchronized, The servlet container may run multiple threads on its methods, but only one at a time in a queued fashion.
 
reply
    Bookmark Topic Watch Topic
  • New Topic