Forums Register Login

interview question

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 883 times.
Similar Threads
What's the best way to handle multiple Java bean instance in Jsp?
Interview Experiences
Mock exam questions
Statement vs PreparedStatement
few doubts in MVC design pattern and EJB Concepts
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:50:16.