• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

object lookup

 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Hot dog! An advertiser loves us THIS much:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic