Before you begin
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.
Why and when to perform this task
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:$AdminApp options
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:
Steps for this task
Using Jacl:
$AdminApp update app1 file {-operation update -contents c:/apps/app1/my.xml -contenturi app1.jar/my.xml}
Using Jython string:
AdminApp.update(‘app1’, ‘file’, ‘[-operation update -contents c:/apps/app1/my.xml -contenturi app1.jar/my.xml]’)
Using Jython list:
AdminApp.update(‘app1’, ‘file’, [‘-operation’, ‘update’, ‘-contents’, ‘c:/apps/app1/my.xml’, ‘-contenturi’, ‘app1.jar/my.xml’])
$ | is a Jacl operator for substituting a variable name with its value |
AdminApp | is an object that supports 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 |
Using Jacl:
$AdminApp update app1 modulefile {-operation addupdate -contents c:/apps/app1/Increment.jar -contenturi Increment.jar -nodeployejb -BindJndiForEJBNonMessageBinding {{"Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc}}}
Using Jython string:
AdminApp.update(‘app1’, ‘modulefile’, ‘[-operation addupdate -contents c:/apps/app1/Increment.jar -contenturi Increment.jar -nodeployejb -BindJndiForEJBNonMessageBinding [["Increment Enterprise Java Bean " Increment Increment.jar,META-INF/ejb-jar.xml Inc]]]')
Using Jython list:
bindJndiForEJBValue = [["Increment Enterprise Java Bean", "Increment", " Increment.jar,META-INF/ejb-jar.xml", "Inc"]] AdminApp.update(‘app1’, ‘modulefile’, [‘-operation’, ‘addupdate’, ‘-contents’, ‘c:/apps/app1/Increment.jar’, ‘-contenturi’,‘Increment.jar’ ‘-nodeployejb', `-BindJndiForEJBNonMessageBinding', bindJndiForEJBValue])
$ | is a Jacl operator for substituting a variable name with its value |
AdminApp | is an object that supports 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 that contains the value of the BindJndiForEJBNonMessageBinding option |
Using Jacl:
$AdminApp update app1 partialapp {-contents c:/apps/app1/app1Partial.zip}
Using Jython string:
AdminApp.update(‘app1’, ‘partialapp’, ‘[-contents c:/apps/app1/app1Partial.zip]')
Using Jython list:
AdminApp.update(‘app1’, ‘partialapp’, [‘-contents’, ‘c:/apps/app1/app1Partial.zip’])
$ | is a Jacl operator for substituting a variable name with its value |
AdminApp | is an object that supports 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 |
Using Jacl:
$AdminApp update app1 app {-operation update -contents c:/apps/app1/newApp1.jar -usedefaultbindings -nodeployejb -BindJndiForEJBNonMessageBinding {{"Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc}}}
Using Jython string:
AdminApp.update(‘app1’, ‘app’, ‘[-operation update -contents c:/apps/app1/newApp1.ear -usedefaultbindings -nodeployejb -BindJndiForEJBNonMessageBinding [["Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc]]]')
Using Jython list:
bindJndiForEJBValue = [["Increment Enterprise Java Bean", "Increment", " Increment.jar,META-INF/ejb-jar.xml", "Inc"]] AdminApp.update(‘app1’, ‘app’, [‘-operation’, ‘update’, ‘-contents’, ‘c:/apps/app1/NewApp1.ear’, ‘-usedefaultbindings’, ‘-nodeployejb', `-BindJndiForEJBNonMessageBinding', bindJndiForEJBValue])
$ | is a Jacl operator for substituting a variable name with its value |
AdminApp | is an object that supports 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