ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzamy_5.4.0.1/50/admin/appsvrnsbind.htm

103 lines
5.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Configure name space bindings</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h4><a name="appsvrnsbind"></a>Configure name space bindings</h4>
<p>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 <a href="../program/jndi.htm">Java Naming and Directory Interface (JNDI)</a> for more information on naming.</p>
<p>You can use the administrative console and wsadmin to configure name space bindings.</p>
<ul>
<li><a href="#acnsbind">Use the administrative console to configure name space bindings</a></li>
<li><a href="#wsansbind">Use wsadmin to configure name space bindings</a></li>
</ul>
<p><strong><a name="acnsbind">Use the administrative console to configure name space bindings</a></strong></p>
<p>To configure name space bindings with the administrative console, follow these steps:</p>
<ol>
<li><a href="acstart.htm">Start the administrative console</a>.</li>
<li>Expand <strong>Environment --&gt; Naming</strong> and click <strong>Name Space Bindings</strong>.</li>
<li>Verify that the scope is set to the server level.</li>
<li>Add, modify, or remove a name space binding.
<ul>
<li>To add a name space binding, follow these steps:
<ol type="a">
<li>Click <strong>New</strong>.</li>
<li>Specify the type of binding that you want to create and click <strong>Next</strong>.</li>
<li>Configure the settings for the binding and click <strong>Next</strong>.</li>
<li>Review the settings and click <strong>Finish</strong>.</li>
</ol></li>
<li>To modify a name space binding, follow these steps:
<ol type="a">
<li>Click the name of the the binding that you want to modify.</li>
<li>Make your changes.</li>
<li>Click <strong>Apply</strong> or <strong>OK</strong>.</li>
</ol></li>
<li>To remove a name space binding, follow these steps:
<ol type="a">
<li>Select the binding that you want to remove.</li>
<li>Click <strong>Delete</strong>.</li>
</ol></li>
</ul></li>
<li><a href="acsave.htm">Save the application server configuration</a></li>
</ol>
<p><strong><a name="wsansbind">Use wsadmin to configure name space bindings</a></strong></p>
<p>To configure name space bindings with wsadmin, follow these steps:</p>
<ol>
<li><p>On the CL command line, run the STRQSH (Start Qshell) command.</p></li>
<li><p>Run the cd command to change to the directory that contains the wsadmin tool:</p>
<pre>cd /QIBM/ProdData/WebASE/ASE5/bin</pre></li>
<li><p><a href="wsarun.htm#start">Start wsadmin</a>.</p></li>
<li><p>At the wsadmin prompt, run this command to identify the application server and assign it to the server variable:</p>
<pre>set server [$AdminConfig getid /Cell:<em>myCell</em>/Node:<em>myNode</em>/Server:<em>myAppSvr</em>/]</pre>
<p>where <em>myCell</em> is the name of the cell that contains your application server, <em>myNode</em> is the name of the node that contains your application server, and <em>myAppSvr</em> is the name of your application server.</p></li>
<li><p>Add a new name space binding on the server.</p>
<ul>
<li><p>To configure a string type name space binding, run this command:</p>
<pre>$AdminConfig create StringNameSpaceBinding $server
{{name <em>myBinding1</em>} {nameInNameSpace <em>myBindings/myString</em>}
{stringToBind &quot;<em>myStringValue</em>&quot;}}</pre>
<p>where <em>myBinding1</em> is the name of the name space binding, <em>myBindings/myString</em> is the name of the binding as it appears in the name space, and <em>myStringValue</em> is the string that you want to bind.</p>
<p><strong>Note:</strong> This command has been wrapped for display purposes.</p></li>
<li><p>To configure a CORBA type name space binding, run this command:</p>
<pre>$AdminConfig create CORBAObjectNameSpaceBinding $server
{{name <em>myBinding2</em>} {nameInNameSpace <em>myBindings/myCORBA</em>}
{corbanameUrl corbaname:<em>iiop:host.mycompany.com:port#stuff/myCORBAObject</em>}}</pre>
<p>where <em>myBinding2</em> is the name of the name space binding, <em>myBindings/myCORBA</em> 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, <em>host.mycompany.com</em> is the name of your iSeries server, <em>port</em> is the name service port for your application server, and <em>#stuff/myCORBAObject</em> is the CORBA object that you want to bind.</p>
<p><strong>Note:</strong> This command has been wrapped for display purposes.</p></li>
<li>To configure an indirect type name space binding, run this command:</p>
<pre>$AdminConfig create IndirectLookupNameSpaceBinding $server
{{name <em>myBinding3</em>} {nameInNameSpace <em>myBindings/myIndirect</em>}
{providerURL corbaloc::<em>host.myCompany.com:port/NameServiceServerRoot</em>}
{jndiName <em>jndiName</em>}}</pre>
<p>where <em>myBinding3</em> is the name of the name space binding, <em>myBindings/myIndirect</em> 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 <em>jndiName</em> is the JNDI name of the object that you want to bind.</p>
<p><strong>Note:</strong> This command has been wrapped for display purposes.</p></li>
</ul><p></p></li>
<li><p>Run this command to save your changes:</p>
<pre>$AdminConfig save</pre></li>
</ol>
</body>
</html>