ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/admin/wsasynp.htm

91 lines
6.9 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>Syntax and parameters</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h4><a name="wsasynp"></a>Syntax and parameters</h4>
<p>This page describes the syntax and parameters of the wsadmin command.</p>
<p><strong>Syntax</strong></p>
<pre>wsadmin -instance <em>instance</em> [ -c '<em>command</em>' | -f <em>scriptfile</em> ] [ -javaoption <em>option</em> ]
[ -lang <em>lang</em> ] [ -p <em>propertiesfile</em> ] [ -profile <em>scriptfile</em> ]
[ -conntype SOAP | RMI | JMS | NONE [ -host <em>host</em> ] [ -port <em>port</em>] ]
[ -wsadmin_classpath <em>classpath</em> ] [ -help | -? ] [ <em>script_parameters</em> ]</pre>
<p><strong>Parameters</strong></p>
<ul>
<li><p><strong>-instance</strong>
<br>This required parameter specifies the instance that you want to administer with wsadmin. If you specify only this parameter, the script starts an interactive wsadmin session.</p></li>
<li><p><strong>-c</strong>
<br>This optional parameter specifies a single command to run. If you specify this parameter, wsadmin runs the command that you enter and then returns control to the Qshell prompt. To run multiple commands, specify a -c parameter for each command that you want to run. The commands run in the order in which they are listed.</p></li>
<li><p><strong>-f</strong>
<br>This optional parameter specifies a script to run. If you specify this parameter, wsadmin runs the script that you specify and then returns you to the Qshell prompt.</p></li>
<li><p><strong>-javaoption</strong>
<br>This optional parameter is available in versions 5.0.2 and later. The value option specifies a valid Java standard or non-standard option. You can include more than one -javaoption parameter when you run the wsadmin command.</p></li>
<li><p><strong>-lang</strong>
<br>Because Jacl is the only supported scripting language, you do not need to specify this parameter.</p></li>
<li><p><strong>-p</strong>
<br>This optional parameter specifies a properties file to load. Three properties files are loaded before any files specified with -p.</p>
<ol>
<li>The first file is the wsadmin.properties file in the /QIBM/UserData/WebASE51/ASE/<em>instance</em>/properties directory, where <em>instance</em> is the name of your application server instance.</li>
<li>The second file is /home/QEJBSVR/wsadmin.properties. This file is not shipped with WebSphere Application Server - Express.</li>
<li>The third file is the file specified by the WSADMIN_PROPERTIES environment variable. This variable is not set by WebSphere Application Server - Express.</li>
</ol>
<p>If you specify the -p parameter, the specified properties file overrides properties in the instance default file and the user default file. You can specify the -p parameter multiple times. If you do, the properties files are invoked in the order specified. For example, if the com.ibm.ws.scripting.port property is specified in the instance default file, the user default, and a custom properties file that you specify with the -p parameter, the script uses the value in the custom properties file.</p></li>
<li><p><strong>-profile</strong>
<br>This optional parameter specifies a profile script. The profile script runs before other commands or scripts. If you specify -c, the profile runs before the single command. If you specify -f, the profile runs before the script. If you do not specify -c or -f, wsadmin runs the commands in the profile and then starts an interactive wsadmin session. You can specify multiple -profile parameters. If you do, the wsadmin script invokes the profile scripts in the order that you specify them.</p></li>
<li><p><strong>-conntype</strong>
<br>This optional parameter specifies to type of connection to use to connect to the application server that you want to administer. The valid values for the conntype parameter are SOAP, RMI, and NONE. The default value is SOAP. The -conntype parameter determines which port, if any, is used to connect to the server. If you specify NONE as the conntype parameter, only the $AdminApp commands are available.</p></li>
<li><p><strong>-host</strong>
<br>This optional parameter specifies the host name of the system running the application server that you want to administer. If you do not specify this parameter, the host name defaults to localhost.</p></li>
<li><p><strong>-port</strong>
<br>If you specify the -conntype parameter, you can specify the port number to use to connect to the remote application server. For example, if you use a SOAP connection, specify the SOAP port for the application server you want to administer. If you do not specify this parameter, the script uses the value specified for the <tt>com.ibm.ws.scripting.port</tt> property in the wsadmin.properties file for your instance, if that property exists. If the property does not exist in any properties file specified explicitly or implicitly for the wsadmin script, an error occurs. When an instance is created, the wsadmin.properties file is updated with the SOAP and RMI connector ports for the instance.</p></li>
<li><p><strong>-wsadmin_classpath</strong>
<br>This optional parameter makes additional classes available to your scripting process. The value <em>classpath</em> specifies the classpath that contains the classes that you want wsadmin to access. The specified classpath is added to the classloader for the scripting process. You can also specify this option in a wsadmin.properties file with the
com.ibm.ws.scripting.classpath property. The -wsadmin_classpath parameter overrides any value specified in wsadmin.properties.</p>
<li><p><strong>-help</strong> or <strong>-?</strong>
<br>Optional argument that provides syntax help.</p></li>
<li><p><strong>script_parameters</strong>
<br>If you specify the -f parameter to run a script, you can include that script's parameters in the wsadmin command.</p>
</ul>
<strong>Examples</strong>
<p>The following examples demonstrate correct syntax. In these examples, mymachine is the name of the host on which server containing the SOAP or RMI connector is running. The port is specified in the wsadmin.properties file by com.ibm.ws.scripting.port.</p>
<ul>
<li>SOAP connection to the default WebSphere Application Server - Express instance on the local host
<pre>wsadmin</pre></li>
<li>SOAP connection to the WebSphere Application Server - Express instance test on the local host
<pre>wsadmin -instance test</pre></li>
<li>SOAP connection with port 8880 to the as400 host
<pre>wsadmin -conntype SOAP -host as400 -port 8880</pre></li>
<li>RMI connection with port 2809 to the as400 host
<pre>wsadmin -conntype RMI -host as400 -port 2809</pre></li>
</ul>
</body>
</html>