• 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

Interview question

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i have been to a job interview in which, between other questions, there
was this one
Which of those should not be used to share data between servlets
1 - Attributes of ServletContext
2 - Attributes of httpSession
3 - database
4 - EJBs

i answered 2), but now that i m thinking of it, i think correct one was
1) since ServletContext are servlet-specific...

anyone could comment? i think this is a SCWCD question.....

regards
marco
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would say 4. 1 and 2 is the way through which servlets share information within the webapp. I would also say that we can use a database that can be shared by multiple servlets. But when it comes to EJB, your server vendor might not support EJB's and if your webapp has some mechanism in which your servlets exchange info through EJB's, then your app will go for a toss!

Anyone to bolster this?
 
reply
    Bookmark Topic Watch Topic
  • New Topic