Naming

Naming is used by clients of WAS applications to obtain references to objects related to those applications, such as EJB homes.

These objects are bound into a mostly hierarchical structure, referred to as a name space. In this structure, all non-leaf objects are called contexts. Leaf objects can be contexts and other types of objects. Naming operations, such as lookups and binds, are performed on contexts. All naming operations begin with obtaining an initial context. We can view the initial context as a starting point in the name space.

The name space structure consists of a set of name bindings, each consisting of a name relative to a specific context and the object bound with that name. For example, the name myApp/myEJB consists of one non-leaf binding with the name myApp, which is a context. The name also includes one leaf binding with the name myEJB, relative to myApp. The object bound with the name myEJB in this example happens to be an EJB home reference. The whole name myApp/myEJB is relative to the initial context, which one can view as a starting place when performing naming operations.

We can access and manipulate the name space through a name server. Users of a name server are referred to as naming clients. Naming clients typically use JNDI to perform naming operations. Naming clients can also use the CORBA CosNaming interface.

Typically, objects bound to the name space are resources and objects associated with installed applications. These objects are bound by the system, and client applications perform lookup operations to obtain references to them. Occasionally, server and client applications bind objects to the name space. An application can bind objects to transient or persistent partitions, depending on requirements.

In J2EE environments, some JNDI operations are performed with java: URL names. Names bound under these names are bound to a completely different name space which is local to the calling process. However, some lookups on the java: name space may trigger indirect lookups to the name server.


 

See Also


Name space logical view

 

Related Tasks


Using naming

 

See Also


Lookup names support in deployment descriptors and thin clients