• 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

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
yesterday i went to one interview;the interviewer asked me one question;(ie) one jsp client is there;he gets bean instance from a pool of bean instanes from container(entity bean);say another jsp(2nd jsp page) is there, he wants same bean instance from the first jsp page without touching container again;i said u can do it using JNDI reference;but the interviewer told me u can do that using handle;Is that possible using Handle;
bye
chaitu
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Yes doing this using handle you don�t loose the time to lookup the reference in the jndi tree, there�s a pattern called ServiceLocator that adresses exactly this task, you can use a code like this:

regards.
reply
    Bookmark Topic Watch Topic
  • New Topic