Publishing a store archive by using the publishstore utility

Although the primary method of publishing a store archive is through the Administration Console, you can also publish a store archive by using the command line. Only one store can be published at a time.

Important:
  1. If you change the web application Context path, you must ensure that it matches the path that is defined in the WebSphere Commerce Server.
  2. When you open a store from Administration Console, you are logged in to the store with the same user name and password that you used to log in to Administration Console. If you change your password in the store, you are also changing it for Administration Console. Instead, to test the features in the store, including changing your password, save the site address, close all browser windows, then log on to the store again. For more information, see Limitations when using multiple browsers windows.
  3. If you plan to change JSP files after you publish your store, disable servlet caching in the WebSphere Application Server.

    WebSphere Commerce Developer If you are using WebSphere Commerce development environment, the servlet caching is disabled by default.

Procedure

  1. Ensure that you have Site Administrator access.
  2. At a command line, change the directory to WC_installdir/bin.
  3. Issue the publishstore command.
    While the store archive is being published, you receive updates on the publishing status. Wait for the publish to complete.
  4. Restart the server.
  5. To view your store, open a web browser to one of the following web addresses:
    • http://host_name/webapp/wcs/stores/servlet/StoreView?storeId=storeId
    • http://host_name/webapp/wcs/stores/servlet/yourStoreName
    Where yourStoreName is the STORE_IDENTIFIER value that you specified in your custom parameters.
    Note:
    • Ensure that yourStoreName contains all lowercase letters.
    • If the STORE_IDENTIFIER contains space characters, then replace the space characters with a hyphen (-).
  6. Optional: Compile your JavaServer Page files. Compiling the JavaServer Pages (JSP) files in your site. Compiling pages significantly reduces the time to load each store page.
  7. To prevent unnecessary exceptions from displaying, delete the SendTransactionMsg job from the scheduled jobs. For more information, see Deleting a scheduled job.
  8. Optional: To enable caching in the starter stores, you must merge the cachespec.xml files.
    From this directory:
    • Windows WAS_installdir\samples\dynacache\ businessmodel
    • LinuxAIXFor IBM i OS operating system WAS_installdir/samples/dynacache/ businessmodel
    To this directory: WC_eardir/Stores.war/WEB-INF

    You must edit the existing cachespec.xml file in the WEB-INF directory with the changes in the first file, rather than replace it.

  9. If you are running your web server on a separate node than the WebSphere Commerce node, complete the following steps after you publish a store archive:
    1. Stop the web server.
    2. Copy the following directory from the WebSphere Commerce machine to the web Server machine in the same location: WC_eardir/Stores.war
    3. Start the web server.
  10. In a clustered environment, you must synchronize all cluster members after you publish a store archive.
    In a clustered environment, it can take some time for the newly published store assets to be propagated to all the nodes in the cluster.