Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
Before starting an application, it must be installed. See the Installing applications with the wsadmin tool article for more information.
Both the update command and the updateinteractive command support a set of options. See the Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands article for a list of valid options for the update and updateinteractive commands. You can also obtain a list of supported options for an Enterprise Archive (EAR) file using the options command, for example:Using Jacl:
$AdminApp optionsUsing Jython:
print AdminApp.options()For more information for the options , update, or updateinteractive commands, see the Commands for the AdminApp object article. Perform the following steps to update an application:
$AdminApp update app1 file {-operation update -contents /home/myProfile/apps/app1/my.xml -contenturi app1.jar/my.xml}
AdminApp.update('app1', 'file', '[-operation update -contents /home/myProfile/apps/app1/my.xml -contenturi app1.jar/my.xml]')
AdminApp.update('app1', 'file', ['-operation', 'update', '-contents', '/home/myProfile/apps/app1/my.xml', '-contenturi', 'app1.jar/my.xml'])
where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminApp | is an object supporting application objects management |
update | is an AdminApp command |
app1 | is the name of the application to update |
file | is the content type value |
operation | is an option of the update command |
update | is the value of the operation option |
contents | is an option of the update command |
/apps/app1/my.xml | is the value of the contents option |
contenturi | is an option of the update command |
app1.jar/my.xml | is the value of the contenturi option |
$AdminApp update app1 modulefile {-operation addupdate -contents /home/myProfile/apps/app1/Increment.jar -contenturi Increment.jar -nodeployejb -BindJndiForEJBNonMessageBinding {{"Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc}}}
AdminApp.update('app1', 'modulefile', '[-operation addupdate -contents /home/myProfile/apps/app1/Increment.jar -contenturi Increment.jar -nodeployejb -BindJndiForEJBNonMessageBinding [["Increment Enterprise Java Bean " Increment Increment.jar,META-INF/ejb-jar.xml Inc]]]')
bindJndiForEJBValue = [["Increment Enterprise Java Bean", "Increment", " Increment.jar,META-INF/ejb-jar.xml", "Inc"]] AdminApp.update('app1', 'modulefile', ['-operation', 'addupdate', '-contents', '/home/myProfile/apps/app1/Increment.jar', '-contenturi','Increment.jar' '-nodeployejb', `-BindJndiForEJBNonMessageBinding', bindJndiForEJBValue])
where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminApp | is an object supporting application objects management |
update | is an AdminApp command |
app1 | is the name of the application to update |
modulefile | is the content type value |
operation | is an option of the update command |
addupdate | is the value of the operation option |
contents | is an option of the update command |
/apps/app1/Increment.jar | is the value of the contents option |
contenturi | is an option of the update command |
Increment.jar | is the value of the contenturi option |
nodeployejb | is an option of the update command |
BindJndiForEJBNonMessageBinding | is an option of the update command |
"Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc | is the value of the BindJndiForEJBNonMessageBinding option |
bindJndiForEJBValue | is a Jython variable containing the value of the BindJndiForEJBNonMessageBinding option |
$AdminApp update app1 partialapp {-contents /home/myProfile/apps/app1/app1Partial.zip}
AdminApp.update('app1', 'partialapp', '[-contents /home/myProfile/apps/app1/app1Partial.zip]')
AdminApp.update('app1', 'partialapp', ['-contents', '/home/myProfile/apps/app1/app1Partial.zip'])
where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminApp | is an object supporting application objects management |
update | is an AdminApp command |
app1 | is the name of the application to update |
partialapp | is the content type value |
contents | is an option of the update command |
/apps/app1/app1Partial.zip | is the value of the contents option |
$AdminApp update app1 app {-operation update -contents /home/myProfile/apps/app1/newApp1.jar -usedefaultbindings -nodeployejb -BindJndiForEJBNonMessageBinding {{"Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc}}}
AdminApp.update('app1', 'app', '[-operation update -contents /home/myProfile/apps/app1/newApp1.ear -usedefaultbindings -nodeployejb -BindJndiForEJBNonMessageBinding [["Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc]]]')
bindJndiForEJBValue = [["Increment Enterprise Java Bean", "Increment", " Increment.jar,META-INF/ejb-jar.xml", "Inc"]] AdminApp.update('app1', 'app', ['-operation', 'update', '-contents', '/home/myProfile/apps/app1/NewApp1.ear', '-usedefaultbindings', '-nodeployejb', `-BindJndiForEJBNonMessageBinding', bindJndiForEJBValue])
where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminApp | is an object supporting application objects management |
update | is an AdminApp command |
app1 | is the name of the application to update |
app | is the content type value |
operation | is an option of the update command |
update | is the value of the operation option |
contents | is an option of the update command |
/apps/app1/newApp1.ear | is the value of the contents option |
usedefaultbindings | is an option of the update command |
nodeployejb | is an option of the update command |
BindJndiForEJBNonMessageBinding | is an option of the update command |
"Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc | is the value of the BindJndiForEJBNonMessageBinding option |
bindJndiForEJBValue | is a Jython variable containing the value of the BindJndiForEJBNonMessageBinding option |
Related concepts
AdminApp object for scripted administration
Related reference
Commands for the AdminApp object
Options for the AdminApp object install, installInteractive, edit,
editInteractive, update, and updateInteractive commands
Example: Obtaining option information for AdminApp object commands