Network Deployment (Distributed operating systems), v8.0 > Reference > Jython script library


Application query scripts

The scripting library provides multiple script procedures to automate the application configurations. This topic provides usage information for scripts that query the application configuration. We can run each script individually or combine procedures to create custom automation scripts for the environment.

Each application management script procedure is located in the WAS_HOME/scriptLibraries/application/V70 directory. Use the following script procedures to query application configurations:



checkIfAppExists

This script checks if the application is deployed on the application server.

To run the script, specify the application name argument, as defined in the following table:

checkIfAppExists argument description. Run the script to see if an application exists.

Argument Description
appName Name of the application of interest.

Syntax

AdminApplication.checkIfAppExists(appName)

Example usage

AdminApplication.checkIfAppExists("myApp")


getAppDeployedNodes

This script lists the nodes on which the application of interest is deployed.

To run the script, specify the application name argument, as defined in the following table:

getAppDeployedNodes argument description. Run the script to list the nodes to which an application is deployed.

Argument Description
appName Name of the application of interest.

Syntax

AdminApplication.getAppDeployedNodes(appName)

Example usage

AdminApplication.getAppDeployedNodes("myApp")


getAppDeploymentTarget

Display the application deployment target for the application of interest.

To run the script, specify the application name argument, as defined in the following table:

getAppDeploymentTarget argument description. Run the script to see information about a deployment target.

Argument Description
appName Name of the application of interest.

Syntax

AdminApplication.getAppDeploymentTarget(appName)

Example usage

AdminApplication.getAppDeploymentTarget("myApp")


getTaskInfoForAnApp

Display task information for a specific application Enterprise Archive (EAR) file. The script obtains information about the data that is needed for the application. You need to provide data for rows or entries that are either missing information, or require an update.

To run the script, specify the EAR file and the task arguments, as defined in the following table:

getTaskInfoForAnApp argument descriptions. Run the script to see information about an EAR file.

Argument Description
earFile Name of the EAR file of interest.
taskName Name of the task of interest.

Syntax

AdminApplication.getTaskInfoForAnApp(appName, taskName)

Example usage

(Windows)

AdminApplication.getTaskInfoForAnApp("c:\ears\DefaultApplication.ear", "MapWebModToVH")

(AIX) (Solaris)
AdminApplication.getTaskInfoForAnApp("/ears/DefaultApplication.ear", "MapWebModToVH")



listApplications

This script lists all deployed applications. The script does not require arguments.

Syntax

AdminApplication.listApplications()

Example usage

AdminApplication.listApplications()


listApplicationsWithTarget

This script lists all deployed applications for a specific target.

To run the script, specify the node name and server name arguments, as defined in the following table:

listApplicationsWithTarget argument descriptions. Run the script to list deployed applications.

Argument Description
nodeName Name of the node of interest.
serverName Name of the server of interest.

Syntax

AdminApplication.listApplicationsWithTarget(nodeName, serverName)

Example usage

AdminApplication.listApplicationsWithTarget("myNode", "server1")



listModulesInAnApp

This script lists each module in a deployed application.

To run the script, specify the application name and server name arguments, as defined in the following table:

listModulesInAnApp argument descriptions. Run the script to list modules in a deployed application.

Argument Description
appName Name of the application of interest.
serverName Name of the server of interest.

Syntax

AdminApplication.listModulesInAnApp(appName, serverName)

Example usage

AdminApplication.listModulesInAnApp("myApp", "myServer")

Use the script library to automate the application serving environment using wsadmin.sh
Automate application configuration
Application administration scripts


Related


Application installation and uninstallation scripts
Application update scripts
Application export scripts
Application deployment configuration scripts

+

Search Tips   |   Advanced Search