WebSphere Application Server - Express, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Updating installed applications with the wsadmin tool

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:
Using Jacl:
$AdminApp options
Using 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:

Steps for this task

  1. Update the installed application using one of the following options:
    • The following command updates 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}
      • 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’])
      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
    • The following command adds a module to the deployed application, if the module does not exist. Otherwise, the existing module is updated.
      • 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])
      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
    • The following command uses a partial application to update a deployed application:
      • 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’])
      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
    • The following command updates the entire deployed application:
      • 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])
        
      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
  2. Save the configuration changes. See the Saving configuration changes with the wsadmin tool article for more information.
  3. In a Network Deployment environment only, synchronize the node. See the Synchronizing nodes with the wsadmin tool article for more information.



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

Task topic    

Terms of Use | Feedback

Last updated: Jun 8, 2005 12:45:23 PM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/txml_updatingapp.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)