Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Q:17 JavaRanck mock exam

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Servlets that implement the SingleThreadedModel cannot share a single HttpSession Object accross multiple servlets.
Correct Answer : False.
I chose "True" as my answer because
multiple requests can belong to the same session
and there could be multiple instances of the servlets implementing SingleThreadedModel.

Can any explain this please ?

-Srini
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that's a trick question. It's suppose to be SingleThreadModel, not SingleThreadedModel.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There ain't no trick in that. Its an error, a simple plain typo error. See my post here.
Now turning to the real qstn..........

Servlets that implement the SingleThreadedModel cannot share a single HttpSession Object accross multiple servlets.

Even though Servlets implement SingleThreadModel, they can still share a "session" among them. SingleThreadModel only gaurentees that there is ONLY ONE thread executing THIS PARTICULAR servlet.
Thats the end of responsibility of SingleThreadModel, it doesn't have any responsibility regarding Shared resources.
regds.
- satya
[ February 17, 2002: Message edited by: Madhav Lakkapragada ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic