WAS v8.5 > End-to-end paths > Naming and directoryUse naming
Naming is used by clients of WebSphere Application Server applications most commonly to obtain references to objects related to those applications, such as EJB homes.
The Naming service is based on the JNDI Specification and the Object Management Group (OMG) Interoperable Naming (CosNaming) specifications Naming Service Specification, Interoperable Naming Service revised chapters and Common Object Request Broker: Architecture and Specification (CORBA).
- Develop the application using either JNDI or CORBA CosNaming interfaces.
Use these interfaces to look up server application objects that are bound into the namespace and obtain references to them. Most Java developers use the JNDI interface. However, the CORBA CosNaming interface is also available for performing Naming operations on name servers or other CosNaming name servers.
- Assemble the application using an assembly tool.
Application assembly is a packaging and configuration step that is a prerequisite to application deployment. If the application you are assembling is a client to an application running in another process, you should qualify the jndiName values in the deployment descriptors for the objects related to the other application. Otherwise, we might need to override the names with qualified names during application deployment. If the objects have fixed qualified names configured for them, you should use them so the jndiName values do not depend on the other application's location within the topology of the cell.
- Optional: Verify the application is assigned the appropriate security role if administrative security is enabled.
For more information on the security roles, see Naming roles.
- Deploy the application.
Install your assembled application on an application server. If the application you are assembling is a client to an application running in another server process, be sure to qualify the jndiName values for the other application's server objects if they are not already qualified. For more information on qualified names, refer to Lookup names support in deployment descriptors and thin clients.
- Configure namespace bindings. This step is necessary in these cases:
- Your deployed application is to be accessed by legacy client applications running on previous versions of the product. In this case, configure additional name bindings for application objects relative to the default initial context for legacy clients. (v5 clients have a different initial context from legacy clients.)
- The application requires qualified name bindings for such reasons as:
- It will be accessed by Java Platform, Enterprise Edition (Java EE) client applications or server applications running in another server process.
- It will be accessed by thin client applications.
In this case, we can configure name bindings as additional bindings for application objects. The qualified names for the configured bindings are fixed, meaning they do not contain elements of the cell topology that can change if the application is moved to another server. Objects as bound into the namespace by the system can always be qualified with a topology-based name. You must explicitly configure a name binding to use as a fixed qualified name.
For more information on qualified names, refer to Lookup names support in deployment descriptors and thin clients. For more information on configured name bindings, refer to Configured name bindings.
- Troubleshoot any problems that develop.
If a Naming operation is failing and you need to verify whether certain name bindings exist, use the dumpNameSpace tool to generate a dump of the namespace.
Specify jndiName values as needed when we assemble or deploy applications, or after deployment.
Subtopics
- Naming
Naming is used by clients of WAS applications to obtain references to objects related to those applications, such as EJB homes.- Namespace logical view
The namespace for the entire cell is federated among all servers in the cell. Every server process contains a name server. All name servers provide the same logical view of the cell namespace.- Initial context support
All naming operations begin with obtaining an initial context. We can view the initial context as a starting point in the namespace. Use the initial context to perform naming operations, such as looking up and binding objects in the namespace.- Lookup names support in deployment descriptors and thin clients
Server application objects, such as EJB homes, are bound relative to the server root context for the server in which the application is installed. Other objects, such as resources, can also be bound to a specific server root. The names used to look up these objects must be qualified so as to select the correct server root. This topic discusses what relative and qualified names are, when they can be used, and how we can construct them.- JNDI support in WAS
WAS v8.5 includes a name server to provide shared access to Java components, and an implementation of the javax.naming JNDI package which supports user access to the name server through the JNDI naming interface.- Develop applications that use JNDI
References to EJB homes and other artifacts such as data sources are bound to the WAS name space. These objects can be obtained through JNDI. Before we can perform any JNDI operations, you need to get an initial context. We can use the initial context to look up objects bound to the name space.- Develop applications that use CosNaming (CORBA Naming interface)
CORBA clients can perform naming operations on name servers through the CosNaming interface.- Configured name bindings
Administrators can configure bindings into the namespace. A configured binding is different from a programmatic binding in the system creates the binding every time a server is started, even if the target context is in a transient partition.- Namespace federation
Federating namespaces involves binding contexts from one namespace into another namespace.- Naming roles
The J2EE role-based authorization concept is extended to protect the CosNaming service.- Configure namespace bindings
Instead of creating namespace bindings from a program, we can configure namespace bindings using the dmgr console. Name servers add these configured bindings to the namespace view by reading the configuration data for the bindings. Configured bindings are created each time a server starts, even when the binding is created in a transient partition of the namespace. One major use of configured bindings is to provide fixed qualified names for server application objects.- Configure name servers
Name servers add configured name space bindings to the name space view by reading the configuration data for the bindings. If we use configured bindings, we do not need to create name space bindings from a program.- Troubleshooting namespace problems
When developing or running applications, you might encounter namespace problems.- Naming and directories: Resources for learning
Additional information and guidance on naming and directories is available on various Internet sites.
Related
Install enterprise application files with the console
Reference:
API documentation