Update installed applications with the wsadmin tool
Overview
Derive a list of supported options for an file using the options command, for example, using Jacl
$AdminApp options...or using Jython...
print AdminApp.options()
Procedure
- Start wsadmin
- Install your application
- Update a single file in a deployed application using Jacl...
$AdminApp update app1 file {-operation update -contents c:/apps/app1/my.xml -contenturi app1.jar/my.xml}...or using Jython...
AdminApp.update('app1', 'file', 'operation update -contents c:/apps/app1/my.xml -contenturi app1.jar/my.xml'])Jython list:
AdminApp.update("app1", "file", ["-operation", "update", "-contents", "c:/apps/app1/my.xml", "-contenturi", "app1.jar/my.xml"])
- The following command adds a module to the deployed application, if the module does not exist. Otherwise, the existing module is updated.
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}}}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]] ]')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])
- The following command uses a partial application to update a deployed application:
Jacl:
$AdminApp update app1 partialapp {-contents c:/apps/app1/app1Partial.zip}Jython string:
AdminApp.update('app1', 'partialapp', '[-contents c:/apps/app1/app1Partial.zip]')Jython list:
AdminApp.update('app1, 'partialapp', ['-contents', 'c:/apps/app1/app1Partial.zip'])
- The following command updates the entire deployed application:
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}}} $AdminConfig saveJython 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]]]')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])
- In a network deployment environment only, synchronize the node.
See Also
AdminApp object for scripted administration
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