Start and stop applications with wsadmin
You can use wsadmin to start and stop applications in your application server.
Start applications with wsadmin
To start an application 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/binAt 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:
set appManager [$AdminControl queryNames type=ApplicationManager,*]This command returns the application manager MBean.
Run this command to start the application:
$AdminControl invoke $appManager startApplication myAppwhere myApp is the name of the application that you want to start.
Stop applications with wsadmin
To stop applications 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/binAt 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:
set appManager [$AdminControl queryNames type=ApplicationManager,*]This command returns the application manager MBean.
You can stop a single application or stop all of the applications that are running in your application server.
To stop a single application, run this command:
$AdminControl invoke $appManager stopApplication myAppwhere myApp is the name of the application that you want to stop.
To stop all of the running applications in your application server, follow these steps:
Run this command to query the running applications in the application server and assign the result to the apps variable:
set apps [$AdminControl queryNames type=Application,*]This command returns a list of application MBeans.
Run this command to stop all of the running applications:
foreach app $apps {set appName [$AdminControl getAttribute $app name]; $AdminControl invoke $appManager stopApplication $appName}
This command has been wrapped for display purposes.