+

Search Tips   |   Advanced Search

Use 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 either

Naming clients typically use the JNDI to perform naming operations.


Tasks

  1. 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 WAS name servers or other CosNaming name servers. Looking up a JNDI name that does not conform to the JNDI javax.naming.CompositeName syntax in the java: namespace results in a different exception type on WAS traditional and Liberty. For example...

      java:/\"jdbc/name

    ...results in InvalidNameException on Liberty and NameNotFoundException on WAS traditional. If it is necessary to look up a name that does not conform to the composite name syntax, then catch both InvalidNameException and NameNotFoundException in applications for deployment to both Liberty and WAS traditional.

  2. 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 we are assembling is a client to an application running in another process, we 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, we should use them so that the jndiName values do not depend on the other application's location within the topology of the cell.

  3. If administrative security is enabled, verify that the application is assigned the appropriate security role

  4. Deploy the application.

    Install the assembled application on an application server. If the application we 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.

  5. Optional: If the application must access applications in other cells, configure foreign cell bindings for the other cells.

  6. 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:

      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. We 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.

  7. Troubleshoot any problems that develop.

    If a Naming operation is failing and we need to verify whether certain name bindings exist, use the dumpNameSpace tool to generate a dump of the namespace.


What to do next

Specify jndiName values as needed when you assemble or deploy applications, or after deployment.


Related:

  • Naming
  • Namespace logical view
  • Configured name bindings
  • Namespace federation
  • Foreign cell bindings
  • Developing applications that use JNDI
  • Developing applications that use CosNaming (CORBA Naming interface)
  • Install enterprise application files with the console
  • Configure namespace bindings
  • Configure name servers
  • Configure foreign cell bindings
  • Troubleshoot namespace problems
  • Initial context support
  • Lookup names support in deployment descriptors and thin clients
  • JNDI support in WAS
  • Naming roles
  • Naming and directories: Resources for learning
  • Programming model APIs and specifications