Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes Regarding JNDI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Regarding JNDI" Watch "Regarding JNDI" New topic
Author

Regarding JNDI

LakshmiNarayana vishnu
Ranch Hand

Joined: Aug 03, 2006
Posts: 39
Hi Friends,
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

Cheers,
Narvish
Lucas Lee
Ranch Hand

Joined: Oct 02, 2006
Posts: 53
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.
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
Also try caching the EJBs home interface (EJBHomeFactory)

http://www-128.ibm.com/developerworks/java/library/j-ejb0924.html


http://www.skillassert.com


S Venkatesh
Ranch Hand

Joined: Jun 27, 2005
Posts: 464

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 pattern for more info on this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding JNDI
 
Similar Threads
JTA objects
WA #1.....word association
lookup meaning?
ejb
J2EE technology would allow the system to interact with the LDAP server?