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

81 lines
3.5 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>Start and stop applications with wsadmin</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h3><a name="wsaappstr"></a>Start and stop applications with wsadmin</h3>
<p>You can use wsadmin to start and stop applications in your application server.</p>
<ul>
<li><a href="#startapp">Start applications with wsadmin</a></li>
<li><a href="#stopapp">Stop applications with wsadmin</a></li>
</ul>
<p><strong><a name="startapp">Start applications with wsadmin</a></strong></p>
<p>To start an application 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/WebASE51/ASE/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 manager MBean for the server where the application resides and assign it the appManager variable:</p>
<pre>set appManager [$AdminControl queryNames type=ApplicationManager,*]</pre>
<p>This command returns the application manager MBean.</p></li>
<li><p>Run this command to start the application:</p>
<pre>$AdminControl invoke $appManager startApplication <em>myApp</em></pre>
<p>where <em>myApp</em> is the name of the application that you want to start.</p></li>
</ol>
<p><strong><a name="stopapp">Stop applications with wsadmin</a></strong></p>
<p>To stop applications 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/WebASE51/ASE/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 manager MBean for the server where the application resides, and assign it to the appManager variable:</p>
<pre>set appManager [$AdminControl queryNames type=ApplicationManager,*]</pre>
<p>This command returns the application manager MBean.</p></li>
<li><p>You can stop a single application or stop all of the applications that are running in your application server.</p>
<ul>
<li><p>To stop a single application, run this command:</p>
<pre>$AdminControl invoke $appManager stopApplication <em>myApp</em></pre>
<p>where <em>myApp</em> is the name of the application that you want to stop.</p></li>
<li><p>To stop all of the running applications in your application server, follow these steps:</p>
<ol type="a">
<li><p>Run this command to query the running applications in the application server and assign the result to the apps variable:</p>
<pre>set apps [$AdminControl queryNames type=Application,*]</pre>
<p>This command returns a list of application MBeans.</p></li>
<li><p>Run this command to stop all of the running applications:</p>
<pre>foreach app $apps {set appName [$AdminControl getAttribute $app name];
$AdminControl invoke $appManager stopApplication $appName}</pre>
<p><strong>Note:</strong> This command has been wrapped for display purposes.</p></li>
</ol><p></p></li>
</ul><p></p></li>
</ol>
</body>
</html>