WAS v8.5 > Reference > Jython script library

Application update scripts

The scripting library provides script procedures to automate the application configurations. This topic provides usage information for scripts that update applications. 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 app_server_root/scriptLibraries/application/V70 directory. Use the following script procedures to update application configurations:


addSingleFileToAnAppWithUpdateCommand

This script uses the update command to add a single file to a deployed application.

To run the script, specify the application name, file name, and the content uniform resource identifier (URI) arguments, as defined in the following table:

addSingleFileToAnAppWithUpdateCommand argument descriptions. Run the script to add a file to a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.
contentURI Specifies the URI of the file content.

Syntax

Example usage


addSingleModuleFileToAnAppWithUpdateCommand

This script uses the update command to add a single module file to a deployed application.

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

addSingleModuleFileToAnAppWithUpdateCommand argument descriptions. Run the script to add a module file to a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.
contentURI Specifies the URI of the file content.

Syntax

Example usage


addUpdateSingleModuleFileToAnAppWithUpdateCommand

This script uses the update command to add and update a single module file for a deployed application.

To run the script, specify the application name, file name, content URI, and context root arguments, as defined in the following table:

addUpdateSingleModuleFileToAnAppWithUpdateCommand argument descriptions. Run the script to update a file in a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.
contentURI Specifies the URI of the file content.
contextRoot Specifies the context root for web modules in the application.

Syntax

Example usage

AdminApplication.addUpdateSingleModuleFileToAnAppWithUpdateCommand("myApp",
"c:\DefaultWebApplication.war", "DefaultWebApplication.war", 
"/webapp/defaultapp")
AdminApplication.addUpdateSingleModuleFileToAnAppWithUpdateCommand("myApp",
"/DefaultWebApplication.war", "DefaultWebApplication.war", 
"/webapp/defaultapp")


addPartialAppToAnAppWithUpdateCommand

This script uses the update command to add a partial application to a deployed application.

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

addPartialAppToAnAppWithUpdateCommand argument descriptions. Run the script to update part of a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.

Syntax

Example usage


deleteSingleFileToAnAppWithUpdateCommand

This script uses the update command to delete a single file from a deployed application.

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

deleteSingleFileToAnAppWithUpdateCommand argument descriptions. Run the script to delete a file from a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.
contentURI Specifies the URI of the file content.

Syntax

Example usage

AdminApplication.deleteSingleFileToAnAppWithUpdateCommand("myApp", "c:\sample.
txt", "META-INFO/sample.txt")
AdminApplication.deleteSingleFileToAnAppWithUpdateCommand("myApp", "/sample.
txt", "META-INFO/sample.txt")


deleteSingleModuleFileToAnAppWithUpdateCommand

This script uses the update command to delete a single module file from a deployed application.

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

deleteSingleModuleFileToAnAppWithUpdateCommand argument descriptions. Run the script to delete a module file from a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.
contentURI Specifies the URI of the file content.

Syntax

Example usage

AdminApplication.deleteSingleModuleFileToAnAppWithUpdateCommand("myApp", 
"c:\Increment.jar", "Increment.jar")
AdminApplication.deleteSingleModuleFileToAnAppWithUpdateCommand("myApp", 
"/Increment.jar", "Increment.jar")


deletePartialAppToAnAppWithUpdateCommand

This script uses the update command to delete a partial application from a deployed application.

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

deletePartialAppToAnAppWithUpdateCommand argument descriptions. Run the script to delete part of a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.
contentURI Specifies the URI of the file content.

Syntax

Example usage

AdminApplication.deletePartialAppToAnAppWithUpdateCommand("myApp", "c:\part
ialdelete.zip", "partialdelete")
AdminApplication.deletePartialAppToAnAppWithUpdateCommand("myApp", "/part
ialdelete.zip", "partialdelete")


updateApplicationUsingDefaultMerge

This script updates an application using default merging.

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

updateApplicationUsingDefaultMerge argument descriptions. Run the script to update a deployed application.

Argument Description
appName Name of the application to update.
earFile Name of the file to use to update the application.

Syntax

Example usage

AdminApplication.updateApplicationUsingDefaultMerge("myApp", "c:\ears\D
efaultApplication.ear")
AdminApplication.updateApplicationUsingDefaultMerge("myApp", "/ears/D
efaultApplication.ear")


updateApplicationWithUpdateIgnoreNewOption

This script updates an application using -update.ignore.new option. The system ignores the bindings from the new version of the application.

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

updateApplicationWithUpdateIgnoreNewOption argument descriptions. Run the script to update a deployed application.

Argument Description
appName Name of the application to update.
earFile Name of the file to use to update the application.

Syntax

Example usage

AdminApplication.updateApplicationWithUpdateIgnoreNewOption("myApp", 
"c:\ears\DefaultApplication.ear")
AdminApplication.updateApplicationWithUpdateIgnoreNewOption("myApp", 
"c:/ears/DefaultApplication.ear")


updateApplicationWithUpdateIgnoreOldOption

This script updates an application using the -update.ignore.old option. The system ignores the bindings from the installed version of the application.

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

updateApplicationWithUpdateIgnoreOldOption argument descriptions. Run the script to update a deployed application.

Argument Description
appName Name of the application to update.
earFile Name of the file to use to update the application.

Syntax

Example usage

AdminApplication.updateApplicationWithUpdateIgnoreOldOption("myApp", 
"c:\ears\DefaultApplication.ear")
AdminApplication.updateApplicationWithUpdateIgnoreOldOption("myApp", 
"/ears/DefaultApplication.ear")


updateEntireAppToAnAppWithUpdateCommand

This script uses the update command to update an entire deployed application.

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

updateEntireAppToAnAppWithUpdateCommand argument descriptions. Run the script to update a deployed application.

Argument Description
appName Name of the application to update.
earFile Name of the file to use to update the application.

Syntax

Example usage


updatePartialAppToAnAppWithUpdateCommand

This script uses the update command to update a partial application for a deployed application.

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

updatePartialAppToAnAppWithUpdateCommand argument descriptions. Run the script to update part of a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.
contentURI Specifies the URI of the file content.

Syntax

Example usage

AdminApplication.updatePartialAppToAnAppWithUpdateCommand("myApp", "c:\part
ialadd.zip", "partialadd")
AdminApplication.updatePartialAppToAnAppWithUpdateCommand("myApp", "/part
ialadd.zip", "partialadd")


updateSingleFileToAnAppWithUpdateCommand

This script uses the update command to update a single file on a deployed application.

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

updateSingleFileToAnAppWithUpdateCommand argument descriptions. Run the script to update a file in a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.
contentURI Specifies the URI of the file content.

Syntax

Example usage

AdminApplication.updateSingleFileToAnAppWithUpdateCommand("myApp", "c:\sample.
txt", "META-INFO/sample.txt")
AdminApplication.updateSingleFileToAnAppWithUpdateCommand("myApp", "/sample.
txt", "META-INFO/sample.txt")


updateSingleModuleFileToAnAppWithUpdateCommand

This script uses the update command to update a single module file for a deployed application.

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

updateSingleModuleFileToAnAppWithUpdateCommand argument descriptions. Run the script to update a module file in a deployed application.

Argument Description
appName Name of the application to update.
fileContent Name of the file to use to update the application.
contentURI Specifies the URI of the file content.

Syntax

Example usage

AdminApplication.updateSingleModuleFileToAnAppWithUpdateCommand("myApp", 
"c:\sample.jar", "Increment.jar")
AdminApplication.updateSingleModuleFileToAnAppWithUpdateCommand("myApp", 
"/sample.jar", "Increment.jar")


Related


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


Reference:

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


+

Search Tips   |   Advanced Search