Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Interview question

 
M Mistroni
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • 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
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic