Use the wsadmin tool and scripting to update installed applications on an application server. 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.
$AdminApp optionsUsing Jython:
print AdminApp.options()For more information for the options, update, or updateinteractive commands, see the Commands for the AdminApp object article. Attention: If an application is running, changing an application setting causes the application to restart. On stand-alone servers, the application restarts after you save the change. On multiple-server products, the application restarts after you save the change and files synchronize on the node where the application is installed.
Perform the following steps to update an application:
Using Jacl:
$AdminApp update app1 file {-operation update -contents /home/myProfile/apps/app1/my.xml -contenturi app1.jar/my.xml}
Using Jython string:
AdminApp.update(‘app1’, ‘file’, ‘[-operation update -contents /home/myProfile/ apps/app1/my.xml -contenturi app1.jar/my.xml]’)
Using Jython list:
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 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 /home/myProfile/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 /home/myProfile/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’, ‘/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 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 /home/myProfile/apps/app1/app1Partial.zip}
Using Jython string:
AdminApp.update(‘app1’, ‘partialapp’, ‘[-contents /home/myProfile/apps/app1/app1Partial.zip]')
Using Jython list:
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 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 /home/myProfile/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 /home/myProfile/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])
where:
$ | 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 |