Configured name bindings

Administrators can configure bindings into the name space. A configured binding is different from a programmatic binding in that the system creates the binding every time a server is started, even if the target context is in a transient partition.

Administrators can add name bindings to the name space through the configuration. Name servers add these configured bindings to the name space view, by reading the configuration data for the bindings. Configuring bindings is an alternative to creating the bindings from a program. Configured bindings have the advantage of being created each time a server starts, even when the binding is created in a transient partition of the name space. Cell-scoped configured bindings provide interoperability with JNDI clients running on previous versions of WebSphere Application Server. Additionally, one can configure cell-scoped bindings to create a fixed qualified name for server objects.

 

Scope

One can configure a binding at one of the following three scopes: cell, node, or server. Cell-scoped bindings are created under the cell persistent root context. Node-scoped bindings are created under the node persistent root context for the specified node. Server-scoped bindings are created under the server root context for the selected server. If the target server of a server-scoped binding is a cluster, the binding is created under the server root context of each cluster member.

Note: The term server includes clusters and can be used interchangeably with the term cluster with respect to configured bindings. When applied to a cluster, a server-scoped binding is created in the server root for all member servers.

The scope you select for new bindings depends on how the binding is to be used. For example, if the binding is not specific to any particular node or server, or if you do not want the binding to be associated with any specific node or server, a cell-scoped binding is a suitable scope. Defining fixed names for enterprise beans to create fixed qualified names is just such an application. If a binding is to be used only by clients of an application running on a particular server, or if you want to configure a binding with the same name on different servers which resolve to different objects, a server-scoped binding would be appropriate. Note that two servers can have configured bindings with the same name but resolve to different objects. At the cell scope, only one binding with a given name can exist.

 

Intermediate Contexts

Intermediate contexts created with configured bindings are read-only. For example, if an EJB home binding is configured with the name some/compound/name/ejbHome, the intermediate contexts some, some/compound, and some/compound/name will be created as read-only contexts. We cannot add, update, or remove any read-only bindings.

The configured binding name cannot conflict with existing bindings. However, configured bindings can use the same intermediate context names. Therefore, a configured binding with the name some/compound/name2/ejbHome2 does not conflict with the previous example name.

 

Configured binding types

Types of objects that you can bind follow:

EJB: EJB home installed in some server in the cell

The following data is required to configure an EJB home binding:

  • JNDI name of the EJB server or server cluster where the enterprise bean is deployed

  • Target root for the configured binding (scope)

  • The name of the configured binding, relative to the target root.

This type of binding is of special significance because use it to provide interoperability with WAS v3.5.x and v4.0.x JNDI clients. The default initial context for these earlier clients is the cell persistent root, which is different from the initial context of the server root for WAS V5 JNDI clients. If you migrate an application to the current release, one can configure an EJB binding at the cell scope so that the lookup names for the enterprise bean do not change for clients still running in a earlier WAS version.

A cell-scoped EJB binding is also useful for creating a fixed lookup name for an enterprise bean so that the qualified name is not dependent on the topology.

Note: In standalone servers, an EJB binding resolving to another server cannot be configured because the name server does not read configuration data for other servers. That data is required to construct the binding.

CORBA: CORBA object available from some CosNaming name server

We can identify any CORBA object bound into some INS compliant CosNaming server with a corbaname URL. The referenced object does not have to be available until the binding is actually referenced by some application.

The following data is required in order to configure a CORBA object binding:

  • The corbaname URL of the CORBA object

  • An indicator if the bound object is a context or leaf node object (to set the correct CORBA binding type of context or object)

  • Target root for the configured binding

  • The name of the configured binding, relative to the target root

Indirect: Any object bound in WAS name space accessible with JNDI

Besides CORBA objects, this includes javax.naming.Referenceable, javax.naming.Reference, and java.io.Serializable objects. The target object itself is not bound to the name space. Only the information required to look up the object is bound. Therefore, the referenced name server does not have to be running until the binding is actually referenced by some application. The following data is required in order to configure an indirect JNDI lookup binding:

  • JNDI provider URL of name server where object resides

  • JNDI lookup name of object

  • Target root for the configured binding (scope)

  • The name of the configured binding, relative to the target root.

A cell-scoped indirect binding is useful when creating a fixed lookup name for a resource so that the qualified name is not dependent on the topology. We can also achieve this topology by widening the scope of the resource definition.

Note: WAS v3.5.x clients cannot access this type of binding .

String: String constant

One can configure a binding of a string constant. The following data is required to configure a string constant binding:

  • String constant value

  • Target root for the configured binding (scope)

  • The name of the configured binding, relative to the target root


 

See Also


Naming
Name space logical view

 

Related Tasks


Configuring and viewing name space bindings
Using naming

 

See Also


Lookup names support in deployment descriptors and thin clients

 

Related Information


Naming in WAS V5: Impact on Migration and Interoperability