+

Search Tips   |   Advanced Search

 

Update installed applications with the wsadmin tool

 

Overview

Use the wsadmin tool to update installed applications on an appserver.

Before updating an application, it must be installed.

Both the update and updateinteractive commands support a set of options. Available obtains can also be obtained by running...

// Jacl:
$AdminApp options

// Jython:
print AdminApp.options()

 

Procedure

  1. Update the installed application using one of the following options:

    • The following command updates a single file in a deployed application:

        Use Jacl:

        $AdminApp update app1 file {-operation update -contents c:/apps/app1/my.xml -contenturi app1.jar/my.xml}
        

        Use Jython string:

        AdminApp.update(‘app1’, ‘file’, ‘[-operation update -contents c:/apps/app1/my.xml 
        -contenturi app1.jar/my.xml]’)
        

        Use Jython list:

        AdminApp.update(‘app1’, ‘file’, [‘-operation’, ‘update’, ‘-contents’, ‘c:/apps/app1/my.xml’, 
        ‘-contenturi’, ‘app1.jar/my.xml’])
        

      where:

      $ Jacl operator for substituting a variable name with its value
      AdminApp object that supports application objects management
      update AdminApp command
      app1 name of the application to update
      file content type value
      operation option of the update command
      update value of the operation option
      contents option of the update command
      /apps/app1/my.xml value of the contents option
      contenturi option of the update command
      app1.jar/my.xml 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.

        Use 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}}}
        

        Use 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]]]')
        

        Use 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:

      $ Jacl operator for substituting a variable name with its value
      AdminApp object that supports application objects management
      update AdminApp command
      app1 name of the application to update
      modulefile content type value
      operation option of the update command
      addupdate value of the operation option
      contents option of the update command
      /apps/app1/Increment.jar value of the contents option
      contenturi option of the update command
      Increment.jar value of the contenturi option
      nodeployejb option of the update command
      BindJndiForEJBNonMessageBinding option of the update command
      "Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc value of the BindJndiForEJBNonMessageBinding option
      bindJndiForEJBValue Jython variable that contains the value of the BindJndiForEJBNonMessageBinding option

    • The following command uses a partial application to update a deployed application:

        Use Jacl:

        $AdminApp update app1 partialapp {-contents c:/apps/app1/app1Partial.zip}
        

        Use Jython string:

        AdminApp.update(‘app1’, ‘partialapp’, ‘[-contents c:/apps/app1/app1Partial.zip]')
        

        Use Jython list:

        AdminApp.update(‘app1’, ‘partialapp’, [‘-contents’, ‘c:/apps/app1/app1Partial.zip’])
        

      where:

      $ Jacl operator for substituting a variable name with its value
      AdminApp object that supports application objects management
      update AdminApp command
      app1 name of the application to update
      partialapp content type value
      contents option of the update command
      /apps/app1/app1Partial.zip value of the contents option

    • The following command updates the entire deployed application:

        Use 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}}}
        

        Use 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]]]')
        

        Use 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:

      $ Jacl operator for substituting a variable name with its value
      AdminApp object that supports application objects management
      update AdminApp command
      app1 name of the application to update
      app content type value
      operation option of the update command
      update value of the operation option
      contents option of the update command
      /apps/app1/newApp1.ear value of the contents option
      usedefaultbindings option of the update command
      nodeployejb option of the update command
      BindJndiForEJBNonMessageBinding option of the update command
      "Increment Enterprise Java Bean" Increment Increment.jar,META-INF/ejb-jar.xml Inc value of the BindJndiForEJBNonMessageBinding option
      bindJndiForEJBValue 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.



Use the 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