Name space bindings
Overview
Using various utilities, administrators can add names to the name space. These bindings will be re-established each time the server starts. There are four different kinds of name space bindings
- EJB
- CORBA object
- Indirect Lookup
- String
Configure using console
- Go to...
Console | Environment | Manage Name Space Bindings- Configure the desired scope
- Click New, or select an existing binding.
- Edit the Binding identifier, the Name in name space, and the String value fields
Note that all of these fields are required.
- Click Finish to register the changes.
Configure using wsadmin
- Get cell id and assign to cell variable.
set cell [$AdminConfig getid /Cell:cell/]- Add a new name space binding on the cell using one of the 4 name space binding types...
- String
$AdminConfig create StringNameSpaceBinding $cell { \ {name bindname} \ {nameInNameSpace Bindings/string} \ {stringToBind "This is the String value that gets bound"} \ }- EJB
For an enterprise bean located in a server...
$AdminConfig create EjbNameSpaceBinding $cell { \ {name binding2} \ {nameInNameSpace Bindings/EJB} \ {applicationNodeName node} \ {bindingLocation SINGLESERVER} \ {applicationServerName server} \ {ejbJndiName ejb/EJB} \ }For an enterprise bean in a cluster...
$AdminConfig create EjbNameSpaceBinding $cell { \ {name binding2} \ {nameInNameSpace Bindings/EJB} \ {bindingLocation SERVERCLUSTER} \ {applicationServerName cluster1} \ {ejbJndiName ejb/EJB} \ }- CORBA
$AdminConfig create CORBAObjectNameSpaceBinding $cell { \ {name binding3} \ {nameInNameSpace Bindings/myCORBA} \ {corbanameUrl corbaname:iiop:somehost.company.com:2809#stuff/CORBAObject} \ {federatedContext false} \ }- Indirect
$AdminConfig create IndirectLookupNameSpaceBinding $cell { \ {name binding4} \ {nameInNameSpace Bindings/Indirect} \ {providerURL corbaloc::myCompany.com:9809/NameServiceServerRoot} \ {jndiName jndi/name/for/EJB} \ }
- Save the changes...
$AdminConfig save
Name space logical view
The name space is federated amongst all servers in the cell. A cell name space is composed of contexts. Every appserver process runs name servers that provides the same logical view as other processes in the cell name space. Linked bindings are created when an existing context is bound under an additional name.
Parititions include...
- System name space
Structure of contexts based on the cell topology, supporting traversal to all parts of a cell name space. Contains cell, node, node persistent, and server roots.
All contexts in the system name space are read-only. You cannot add, update, or remove any bindings.
- Server root
Each server in a cell has a transient read/write partition of the cell name space, called the server root context, which houses system artifacts such as EJB homes. Distributing application objects among many server roots is a departure from previous WAS releases, where all system artifacts were bound under a single root.
- Cell persistent
A binding created under the cell persistent root is saved as part of the cell configuration and continues to exist until it is explicitly removed. Applications can create additional persistent bindings of objects under the cell persistent root.
- Node persistent
Similar to the cell partition. A binding created under a node persistent root is saved as part of that node configuration and continues to exist until it is explicitly removed.
Name space binding collection
To configure a name binding of an EJB, a CosNaming NamingContext, a leaf node object, an object that you can look up using JNDI, or a constant string value...
Environment | Naming | Name Space Bindings
Click the check boxes to select one or more of the users in your collection.
Name
Names given to uniquely identify these configured bindings.
Scope
Configuration location for the namebindings.xml file. This field is for information purposes only and cannot be updated. If the configured binding is cell-scoped, the starting context is the cell persistent root context. If the configured binding is node-scoped, the starting context is the node persistent root context. If the configured binding is server-scoped, the starting context is the server's server root context.
Binding Type
Valid values are String, EJB, CORBA, and Indirect. This field is for information purposes only and cannot be updated.