Deprecated feature

Enabling store separation in an existing clustered environment

If your site uses a clustered environment, you can separate the store web application archive (WAR) from the WebSphere Commerce enterprise archive (EAR) within this environment. When the store separation process completes, a new store EAR is created that contains an copy of the store WAR. The original store WAR within the WebSphere Commerce EAR is disabled. With this separation, the storefront assets for your WebSphere Commerce instance are included either within the store EAR or the WebSphere Commerce EAR and referenced by the store EAR through a shared library.

Before you begin

Ensure that you complete the following tasks:

Procedure

  1. On the WebSphere Commerce primary node
  2. In a command-line utility, go to the following directory:
    • For IBM i OS operating systemSolarisLinuxAIXWC_installdir/bin
    • WindowsWC_installdir\bin
  3. Run the following command to run the store separation enablement script.
    • For IBM i OS operating systemSolarisLinuxAIXconfig_ant.sh -buildfile WC_installdir/components/common/xml/enableFeature.xml -DinstanceName=instance_name -DfeatureName=store-separation -DdbUserPassword=db_password [-DdbaPassword=administrative_password]
    • Windowsconfig_ant.bat -buildfile WC_installdir\components\common\xml\enableFeature.xml -DinstanceName=instance_name -DfeatureName=store-separation -DdbUserPassword=db_password [-DdbaPassword=administrative_password]
    Where the administrative_password is mandatory only when you are enabling store separation on an authoring environment. The administrative_password is not needed in a hosted environment that is not configured for authoring.

    For more information about separating the store WAR file, see Separating the store WAR from the WebSphere Commerce EAR.

    When you run the store separation enablement script, the enablement process completes the following tasks to separate the store WAR from the WebSphere Commerce EAR:
    • Build a new store EAR by exporting a copy of the store WAR from the WebSphere Commerce EAR.
    • Disable the original store WAR within the WebSphere Commerce EAR.
    • Deploy the new store EAR with the same context root as the original store WAR. By default, the context root is /webapp/wcs/stores.
      Note: If your store uses a different context root than the default /webapp/wcs/stores root, change the generated context root to match the context root for your store. You can change the generated context root for the new store EAR after you enable the store archive separation.
    • Configures two shared libraries. The class path definition of the shared library is on a directory level. One library is for the default WebSphere Commerce directories and assets, and one library is for custom directories and assets.
    • Creates a server level extension class loader for use with the configured shared libraries.
    • Associates the shared libraries with the custom class loaders
  4. Verify that the store separation enablement script ran successfully. After enablement process completes, ensure that the BUILD SUCCESSFUL message displays within the console.
    1. In a file manager, go to the following directory:
      • For IBM i OS operating systemSolarisLinuxAIXWC_installdir/instances/instance_name/logs
      • WindowsWC_installdir\instances\instance_name\logs
    2. Open the enablestore-separation_timestamp.log file. Ensure that the BUILD SUCCESSFUL message displays within the log file.
    3. Go to the following directory:
      • For IBM i OS operating systemSolarisLinuxAIXWAS_installdir/profiles/instance_name/installedApps/WC_instance_name_cell
      • WindowsWAS_installdir\profiles\instance_name\installedApps\WC_instance_name_cell
    4. Ensure that new store EAR, WCStores_instance_name.ear, displays within the WC_instance_name_cell directory.
  5. Regenerate the WebSphere Application Server web server plug-in configuration file.
  6. On your web server, update the path to the plugin-cfg.xml file within the web server configuration file.
  7. If your web server runs on a separate node than the WebSphere Commerce node, copy your store web assets to the separate web server node.
    1. On the WebSphere Commerce node, go to the WAS_installdir\profiles\instance_name\installedApps\WC_instance_name_cell\Stores_war.ear\Stores.war directory:
    2. Copy the store assets within the Stores.war directory.
    3. On the web server node, go to the WAS_installdir\profiles\instance_name\installedApps\WC_instance_name_cell\Stores_war.ear\Stores.war directory
    4. Add the copied store assets into this directory on your web server node.
  8. Restart the web Server.
  9. Restart the WebSphere Commerce cluster.

Results

The store WAR for your WebSphere Commerce instance is separated from the WebSphere Commerce EAR. You can deploy any future changes into the appropriate EAR without affecting the other EAR.

Note: If you add a node or cluster member, you must update the shared library and class loader to work with the new node or member. To update the library and class loader to work with a new node or cluster member:
  1. In a command-line utility, go to the following directory:
    • For IBM i OS operating systemSolarisLinuxAIXWC_installdir/bin
    • WindowsWC_installdir\bin
  2. Run the following command:
    • For IBM i OS operating systemSolarisLinuxAIX./config_ant.sh -buildfile WC_installdir/components/store-separation/xml/syncClassLoader.xml -DinstanceName=demo
    • Windows.\config_ant.bat -buildfile WC_installdir\components\store-separation\xml\syncClassLoader.xml -DinstanceName=demo

What to do next

After you separate the store WAR, update any store functions and processes that use assets that were included within the default store WAR. Update these functions and processes to point to the new location of the store assets in the store EAR.

When your store developers create or change store assets, the assets can be deployed into the new store EAR with the WebSphere Commerce Build and Deployment tool. For more information, see Deploying new and changed store assets into a separated store EAR.