Tutorials > Customize > Deploy precompiled JSP files to the WebSphere Commerce Server

< Previous | Next >


Deploy the precompiled JSP files to the production server

In this task, you take the partialApp.jar file that you created in Task 2 and deploy it to the production server. If you are not clustered, this causes the WebSphere Commerce application to be down; WebSphere Application Server restarts it. If you are clustered, you can take action to ensure that you have no downtime. This action is explained in a following task.

Follow these steps to deploy the precompiled JSP files.


Procedure

  1. If you performed Tasks 1 and 2 on a dedicated build machine, transfer the partialApp.jar file that you created on the build machine to a directory on the production machine. Let's assume that you put the file under /mytmp/partialApp.jar.

  2. Remove old compiled JSP files. On each node that is running this application, and for each server that is running the application, remove the compiled JSP files in the WebSphere temp directory:

    rm -r PROFILE_HOME/temp/nodeName/serverName/WC_instance
    

    Where:

    nodeName

    The name of the WebSphere node.

    serverName

    The name of the application server running WebSphere Commerce.

  3. You might also want to clear the dynamic cache files to ensure that the new JSP files are used after they are deployed.

  4. The following script can be used by the wsadmin tool to deploy the precompiled JSP files: update.jacl. Place this file on your application server's file system.

    Here is an example of the script's actions in summary. In this example, assume that you've copied the file to /mytmp/update.jacl. First the script determines if the application to be updated is clustered.

    • If the application is clustered, the script does the following things:

      1. Updates the application with the contents of the JAR file.

      2. Disables node synchronization on all nodes in the Cell.

      3. Invokes the updateAppOnCluster task to roll out the update. For each node that runs the application to be updated, this task performs the following steps:

        1. Stops the servers on the node

        2. Synchronizes the node

        3. Starts the servers on the node

          Since this task performs the procedure for each node in sequence, users of the site see that the application continues to run. At any time, one node of the cluster is not taking workload. Ensure that you have sufficient hardware to handle the increased workload on the remaining nodes during the period of update.

    • If the application is not clustered, the script does the following things:

      1. Updates the application with the contents of the JAR file.

      2. Saves the configuration. WebSphere Application Server automatically restarts the application. Users of the site cannot use the application during this process.

        The comments in the JACL script provide documentation, in case to see the details of each step.

  5. Invoke the script using the wsadmin command line utility:

    PROFILE_HOME/bin/wsadmin -f /mytmp/update.jacl WC_instance /mytmp/partialApp.jar [timeout]
    

    Where:

    instance

    The name of the WCS instance

    timeout

    The timeout in seconds to wait for the application server to stop and start. The default value is 300 if this parameter is not provided.

    Example:

    PROFILE_HOME/bin/wsadmin -f /mytmp/update.jacl WC_demo/mytmp/partialApp.jar
    

< Previous | Next >


+

Search Tips   |   Advanced Search