• Post Reply Bookmark Topic Watch Topic
  • New Topic

object lookup

 
Allan Moster
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible for the EJB container and the name server to be the same? Mu understanding is the name server (JNDI) does not actually store the objects but stores reference to an object. The bean (object) is stored in the EJB container. What data is used as a reference to the particular container/bean? Can anyone enlighten me what exactly is going on in the object lookup via JNDI.
 
Subrahmanyam Allamaraju
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This depends on how a container provides for JNDI. App Servers like WebLogic, Orion have provide JNDI implementations and hence "the EJB container and the name server" are the same. This approach is lightweight and has performance advantages.
Secondly, it is also possible to have the EJB container separate from the JNDI provider, in which case, you may plugin various JNDI providers.
In both cases, the JNDI implementation is unaware of what objects the container is storing in them. Your understanding about JNDI providers not storing actual objects is not true. JNDI maintains objects, whatever those are. For instance, in the case of an EJB, the container stores (or publishes) a proxy object in the JNDI, and that is what a client looksup for and gets it.
The same happens when you declare a resource such as a DataSource in your app server. The app server creates a DataSource object and publishes it under the appropriate name in the JNDI.

------------------
Subrahmanyam Allamaraju
Author of Professional Java Server Programming J2EE 1.3 Edition
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In CORBA, we have IOR to give information about the object location etc.
How does JNDI know about the obejct details, is there any IOR kinda thing available.
thanks,
Ramdhan YK
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!