Deploying Java EE assets for a partial application

The partial application option provides you with the ability to deploy several files into the Java EE application at the same time. You can use this optionn when you want to delete any number of files that are in the Java EE application.

Do not use this option if the single file is a Java EE module. Java EE modules must be deployed as an entire module.

You use this option to deploy any combination of assets such as:
  • Logic JAR files
  • JSP files
  • Configuration XML files
In the packaging phase, you built a compressed file that contains the assets that you want to deploy. This compressed file is used as the input to this process.

Consider the following scenario: a problem is found in a JSP file and a controller command. The developer changes and tested it in the development environment. The functional tester validates the change in the quality assurance environment. It is now time to deploy the changed assets to your production site. Regardless of whether you use the graphical or scripting tools, always back up your Java EE assets before you deploy.

In the packaging phase, you build a single compressed file that contains:

  • The entire logic JAR file that includes all existing code that is part of that JAR file, including your changed controller command class file
  • The JSP file

The structure of the compressed file would look similar to the following structure:

  • WebSphereCommerceServerExtensionsLogic.jar
  • Stores.war/myStore/myPage.jsp

Before you begin

If you are deploying a partial application that contains deleted assets, you can use the WebSphere administrative console to either add or update assets. However, if you want to delete application files when you deploy a partial application update, you must first supply a special metadata file called META-INF/ibm-partialapp-delete.props in the partial application compressed file before you continue with the following procedure.

Procedure

  1. Back up your Java EE assets.
  2. Place the compressed file containing your changed files either on the machine that is running WebSphere administrative console or the machine that is running the web browser that you are using to access the WebSphere administrative console.
  3. Starting and stopping quick reference.
  4. Open the WebSphere Integrated Solutions Console.
  5. In the WebSphere administration console, expand Applications > Application Types > WebSphere enterprise applications .
  6. From the Enterprise Applications list, select the check box next to the Java EE application for your instance, such as, WC_instance_name
    For example, WC_demo. Click Update.
  7. On the Preparing for Application Update page, under the Application update options section:
    1. Select Replace, add, or delete multiple files.
    2. If your changed files are on the same machine as the web browser used to connect to the WebSphere administrative console:
      Note: If you are typing in the directory paths, you should always use forward slashes no matter which platform you are using. You should also not prefix with a leading slash.
      1. Under Upload the archive file with the new or replacement files. select Local file system.
      2. Specify the full path and file name to the compressed file that contains all of your changed files. Click Next.
    3. If your changed file is on the server that your web browser is connected to use the WebSphere administrative console:
      Note: If you are typing in the directory paths, you should always use forward slashes no matter which platform you are using. You should also not prefix with a leading slash.
      1. Under Specify the path to the compressed file. select Remote file system.
      2. Specify the full path and file name to the compressed file that contains all of your changed files.
      3. Click Next.
  8. The Updating Application page displays with a confirmation message, indicating your file is updated. Click OK.
  9. WebSphere Application Server saves the updates and deploys the file. On the Updating page, click Save directly to the master configuration to save your changes.

Results

Deploying using the wsadmin tool

  1. Back up your changed assets before you deploy your changed files.
  2. Place the compressed file containing your changed files on the file system of the machine that is running the wsadmin tool.
  3. Start the wsadmin tool.
  4. Run the following commands. The command that you need to use depends on the language you selected:
    • Jacl

      $AdminApp update WC_ instance_name partialapp {-contents path to partial compressed file}

      $AdminConfig save

      For example: $AdminApp update WC_prod partialapp {-contents /deployments/2007-01-01a/partialApp.zip}

      $AdminConfig save

    • Jython

      AdminApp.update('WC_ instance_name', 'partialapp', '[-contents path to partial compressed file]')

      AdminConfig.save()

      For example: AdminApp.update('WC_prod', 'partialapp', '[-contents /deployments/2007-01-01a/partialApp.zip]')

      AdminConfig.save()