Initial context support

 

+

Search Tips   |   Advanced Search

 

All naming operations begin with obtaining an initial context. We can view the initial context as a starting point in the name space. Use the initial context to perform naming operations, such as looking up and binding objects in the name space.

 

Initial contexts registered with the ORB as initial references

The server root, cell persistent root, cell root, and node root are registered with the name server's ORB and can be used as an initial context. An initial context is used by CORBA and enterprise bean applications as a starting point for name space lookups. The keys for these roots as recognized by the ORB are shown in the following table:

Root Context Initial Reference Key
Server Root NameServiceServerRoot
Cell Persistent Root NameServiceCellPersistentRoot
Cell Root NameServiceCellRoot, NameService
Node Root NameServiceNodeRoot

A server root initial context is the server root context for the specific server you are accessing. Similarly, a node root initial context is the node root for the server being accessed.

Use the previously mentioned keys in CORBA INS object URLs (corbaloc and corbaname) and as an argument to an ORB resolve_initial_references call. For examples, see CORBA and JNDI programming examples, which show how to get an initial context.

 

Default initial contexts

The default initial context depends on the type of client. Different categories of clients and the corresponding default initial context follow.

  • WebSphere Application Server V5 and V6 JNDI interface implementation

    The JNDI interface is used by EJB applications to perform name space lookups. WAS clients by default use the WAS CosNaming JNDI plug-in implementation. The default initial context for clients of this type is the server root of the server specified by the provider URL. For more details, refer to the JNDI programming examples on getting initial contexts.

  • WAS JNDI interface implementation prior to V5

    WAS clients running in releases prior to WAS V5 by default use WAS's v4.0 CosNaming JNDI plug-in implementation. The default initial context for clients of this type is the cell persistent root, also known as the legacy root.

  • Other JNDI implementation

    Some applications can perform name space lookups with a non-WAS CosNaming JNDI plug-in implementation. Assuming the key NamingContext is used to obtain the initial context, the default initial context for clients of this type is the cell root.

  • CORBA

    The standard CORBA client obtains an initial org.omg.CosNaming.NamingContext reference with the key NamingContext. The initial context in this case is the cell root.


 

See Also

Naming
Name space logical view
Using naming
Developing applications that use JNDI
Developing applications that use CosNaming (CORBA Naming interface)
Example: Getting the default initial context
Example: Getting an initial context by setting the provider URL property
Example: Getting an initial context with CosNaming