The application server name space consists of references to objects that the application server uses. A name space binding is a reference to a particular object. Because the name of an object in the name space does not change, you can change the names of the resources that your applications use, and the applications can still connect to those resources. See Java Naming and Directory Interface (JNDI) for more information on naming.
You can use the administrative console and wsadmin to configure name space bindings.
Use the administrative console to configure name space bindings
To configure name space bindings with the administrative console, follow these steps:
Use wsadmin to configure name space bindings
To configure name space bindings with wsadmin, follow these steps:
On the CL command line, run the STRQSH (Start Qshell) command.
Run the cd command to change to the directory that contains the wsadmin tool:
cd /QIBM/ProdData/WebASE51/ASE/bin
At the wsadmin prompt, run this command to identify the application server and assign it to the server variable:
set server [$AdminConfig getid /Cell:myCell/Node:myNode/Server:myAppSvr/]
where myCell is the name of the cell that contains your application server, myNode is the name of the node that contains your application server, and myAppSvr is the name of your application server.
Add a new name space binding on the server.
To configure a string type name space binding, run this command:
$AdminConfig create StringNameSpaceBinding $server {{name myBinding1} {nameInNameSpace myBindings/myString} {stringToBind "myStringValue"}}
where myBinding1 is the name of the name space binding, myBindings/myString is the name of the binding as it appears in the name space, and myStringValue is the string that you want to bind.
Note: This command has been wrapped for display purposes.
To configure a CORBA type name space binding, run this command:
$AdminConfig create CORBAObjectNameSpaceBinding $server {{name myBinding2} {nameInNameSpace myBindings/myCORBA} {corbanameUrl corbaname:iiop:host.mycompany.com:port#stuff/myCORBAObject}}
where myBinding2 is the name of the name space binding, myBindings/myCORBA is the name of the binding as it appears in the name space, and the value of the corbanameUrl attribute is the URL for the object that you want to bind. Specifically, host.mycompany.com is the name of your iSeries server, port is the name service port for your application server, and #stuff/myCORBAObject is the CORBA object that you want to bind.
Note: This command has been wrapped for display purposes.
$AdminConfig create IndirectLookupNameSpaceBinding $server {{name myBinding3} {nameInNameSpace myBindings/myIndirect} {providerURL corbaloc::host.myCompany.com:port/NameServiceServerRoot} {jndiName jndiName}}
where myBinding3 is the name of the name space binding, myBindings/myIndirect is the name of the binding as it appears in the name space, the value of the providerURL attribute is the URL to the CORBA name service, and jndiName is the JNDI name of the object that you want to bind.
Note: This command has been wrapped for display purposes.
Run this command to save your changes:
$AdminConfig save