WAS v8.5 > Script the application serving environment (wsadmin) > Manage deployed applications using wsadmin.shStopping business-level applications using scripting
We can use wsadmin and the BLAManagement command group to stop business-level applications.
There are two ways to complete this task. Use the BLAManagement command group for AdminTask or the scripts in the AdminBLA script library to stop your business-level applications.
- Use AdminTask to stop business-level applications.
- Start the wsadmin scripting tool.
- List the business-level applications in the environment.
Use the listBLAs command to display a list of business-level applications in the environment, as the following example demonstrates:
AdminTask.listBLAs()
We can optionally specify the partial name of the business-level application of interest to display the configuration ID of the business-level application. The command accepts a partial business-level application name if the system matches the specified name to a unique configuration ID. Use the following example to set the configuration ID of the myBLA business-level application to the blaID variable:
myBLA=AdminTask.listBLAs('-blaID BLA1')
- Determine the status of the business-level application.
Use the getBLAStatus command to display the status of the business-level application of interest, as the following example demonstrates:
AdminTask.getBLAStatus('-blaID myBLA')
The command returns the status of the business-level application as STOPPED or RUNNING.
- Stop the running business-level application.
Use the stopBLA command to stop the business-level application, as the following example demonstrates:
AdminTask.stopBLA('-blaID myBLA')
The command returns the following message if the system successfully stops the business-level application:
BLA ID of stopped BLA if the BLA was not already stopped.
- Use the Jython script library to stop business-level applications.
- Start the wsadmin scripting tool.
- List the business-level applications in the environment.
Use the listBLAs script to display a list of business-level applications in the environment, using the following syntax:
AdminBLA.listBLAs(blaName, displayDescription)
We can specify one, both, or neither the blaName and displayDescription arguments. Use the blaName argument to specify the name of a specific business-level application, and the displayDescription argument to specify whether to display the description of each returned business-level application. Specify an empty string in place of arguments that we do not want to specify, as the following example demonstrates:
AdminBLA.listBLAs("", "true")
- Stop the business-level application.
Use the stopBLA script to stop the business-level application, using the following syntax:
AdminBLA.stopBLA(blaName)
Use the blaName argument to specify the name of the business-level application to stop, as the following example demonstrates:
AdminBLA.stopBLA("myBLA")
Related
Start business-level applications using scripting
Stopping applications using wsadmin.sh
Stopping business-level applications
Reference:
Business-level application configuration scripts
BLAManagement command group for AdminTask using wsadmin.sh