Application query scripts
The scripting library provides multiple script procedures to automate your application configurations. See the usage information for scripts that query your application configuration. You can run each script individually or combine procedures to create custom automation scripts for your environment.
checkIfAppExists
This script checks if the application is deployed on the application server.
Argument | Description |
---|---|
appName | Specifies the 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.
Argument | Description |
---|---|
appName | Specifies the name of the application of interest. |
Syntax
AdminApplication.getAppDeployedNodes(appName)
Example usage
AdminApplication.getAppDeployedNodes("myApp")
getAppDeploymentTarget
This script displays the application deployment target for the application of interest.
Argument | Description |
---|---|
appName | Specifies the name of the application of interest. |
Syntax
AdminApplication.getAppDeploymentTarget(appName)
Example usage
AdminApplication.getAppDeploymentTarget("myApp")
getTaskInfoForAnApp
This script displays task information for a specific application Enterprise Archive (EAR) file. The script obtains information about the data that is needed for your application. You need to provide data for rows or entries that are either missing information, or require an update.
Argument | Description |
---|---|
earFile | Specifies the name of the EAR file of interest. |
taskName | Specifies the name of the task of interest. |
Syntax
AdminApplication.getTaskInfoForAnApp(appName, taskName)
Example usage
AdminApplication.getTaskInfoForAnApp("c:\ears\DefaultApplication.ear", "MapWebModToVH")
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.
Argument | Description |
---|---|
nodeName | Specifies the name of the node of interest. |
serverName | Specifies the 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.
Argument | Description |
---|---|
appName | Specifies the name of the application of interest. |
serverName | Specifies the name of the server of interest. |
Syntax
AdminApplication.listModulesInAnApp(appName, serverName)
Example usage
AdminApplication.listModulesInAnApp("myApp", "myServer")