File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
EJB and other Java EE Technologies
Joined: Aug 03, 2006
Oct 01, 2006 13:14:00
If there are 100 beans in JNDI & the context.lookup() method takes time to lookup. How do you handle the situation to make it easy retrieval of the bean ?
Please reply soon
Joined: Oct 02, 2006
Oct 02, 2006 22:06:00
Of course you can wrap the context.lookup() statements to a utility method.
For example,wrap to util.getRemoteObject(jndiName),for more simplicity,util.getA(),util.getB(),etc,but need more code.
Joined: Sep 06, 2003
Oct 03, 2006 04:10:00
Also try caching the
home interface (EJBHomeFactory)
Joined: Jun 27, 2005
Oct 05, 2006 04:24:00
It is always a good practise to cache the JNDI when the application server comes up and use the same cache for the lookup. You can look at the service locator design
for more info on this.
I agree. Here's the link:
subject: Regarding JNDI
context.lookup() performance isuue
Performance of Sychronization
When I need use PortableRemoteObject.narrow() ?
How to installa tomcat plug-in into eclipse
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015