aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes interview question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "interview question" Watch "interview question" New topic
Author

interview question

kesava chaitanya
Greenhorn

Joined: Aug 20, 2001
Posts: 28
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
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
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.
 
Consider Paul's rocket mass heater.
 
subject: interview question
 
Similar Threads
What's the best way to handle multiple Java bean instance in Jsp?
Mock exam questions
few doubts in MVC design pattern and EJB Concepts
Interview Experiences
Statement vs PreparedStatement