A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
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
J2EE technology would allow the system to interact with the LDAP server?
WA #1.....word association
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015