Deploying your customizations

Once you complete and test the customization, you are ready to deploy your custom code to a target WebSphere Commerce Server to make the new function available to your business users. Deploying to the server involves exporting code from the WebSphere Commerce development environment and deploying code into the target WebSphere Commerce Server.

Before you begin

You must have created a store, based upon the ConsumerDirect starter store, on the remote WebSphere Commerce Server before starting these deployment steps.

About this task

This tutorial continues the customization performed in Tutorial: Adding fields in the Catalogs tool. You can choose to complete the deployment together after completing these two tutorials or you can deploy them separately, in sequence. To reduce the deployment time and downtime of a production site, it is recommended that you complete one single deployment.


  1. Export the code from the WebSphere Commerce development environment:
    1. Export the LOBTools project:
      1. In the Enterprise Explorer view, expand LOBTools; then click Export > WAR file.
      2. Click Browse to select a destination.
      3. Click Finish.
    2. Optional: If you have not already deployed either Tutorial: Adding new properties to a WebSphere Commerce service using the data service layer or Tutorial: Adding fields in the Catalogs tool, export the WebSphereCommerceServerExtensionsLogic project:
      1. Switch to the Enterprise Explorer view.
      2. Navigate to Other Projects > WebSphereCommerceServerExtensionsLogic.
      3. Right-click the WebSphereCommerceServerExtensionsLogic project and select Export. The Export wizard opens.
      4. In the Export wizard:
        1. Select JAR file and click Next. The WebSphereCommerceServerExtensionsLogic project is selected by default. Leave this value selected.
        2. In the right panel, ensure that the following resources are not selected:
          • .classpath
          • .classpath.template
          • .project
          • .runtime
        3. Ensure that Export generated class files and resources is selected.
        4. Do not select Export Java source files and resources.
        5. In the Select the export destination field, type the fully-qualified JAR file name to use. In this case, type Drive:\ExportTemp\WebSphereCommerceServerExtensionsLogic.jar.
        6. Click Finish.
    3. To export the data service layer (DSL) extension configuration files, copy the XML configuration files to the directory that you are using to build your deployment package:
      1. Navigate to your temporary directory, for example, drive:\ExportTemp.
      2. Create the xml\config\ directory. The structure within this directory must match the structure that you want inside the EAR file.
      3. Copy the files from the WC_eardir\xml\config\ directory to drive:\ExportTemp\xml\config\ directory. In this tutorial, these files include:
        • wc-component.xml
        • wc-business-object-mediator.xml
        • wc-object-relational-metadata.xml
        • *.tpl (the query templates files)
      4. Create a compressed (zip) file that contains all of the files under the ExportTemp directory. Name the file, for example, drive:\ExportTemp\ The following example shows a sample structure of the zip file:
    4. Copy the access control policies that were created for your new resources:
      1. Navigate to the WC_eardir\xml\policies\xml directory.
      2. Copy the following files into the drive:\ExportTemp\ACPolicies directory:
        • MyCompanyCatalogAccessControlPolicies.xml
  2. Deploy the code into the target WebSphere Commerce Server:
    1. To deploy LOBTools.war:
      1. In the WebSphere Application Server, select Administrative console. Navigate to Applications > Enterprise Applications.
      2. In the Application Name field, specify the name of the application, for example, WC_demo, and click Update.
      3. Select Single module and change the specified path to your path.
      4. Click Next.
      5. In the next page, do not make any changes and click Next.
      6. Click Continue on the following page.
      7. To map the module to the server, select the Module, press Ctrl, select the Clusters and Servers that are running your WebSphere Commerce application, and then click Apply.
      8. Select VH_demo_Tools in the Virtual host dropdown list.
      9. Click Next, and then click Finish.
    2. To deploy the WebSphereCommerceServerExtensionsLogic.jar file and the XML configuration files, you create a temporary directory on the target WebSphere Commerce Server, and then copy your export assets into this directory:
      1. Package the WebSphereCommerceServerExtensionsLogic.jar file and the xml directory into a zip file. For example,
      2. In the WebSphere Application Server administrative console, select Applications > Enterprise Applications.
      3. In the Application Name field, specify the name of the application, for example, WC_demo, and click Update.
      4. Select Partial Application.
      5. In the Upload the archive file with the new or replacement files section, select Local file system, click Browse, and then specify the path to the drive:\ImportTemp\ file.
      6. Click Next.
      7. Click OK.
    3. Save the changes:
      1. Click Save to Master Configuration. The WebSphere Commerce application will restart. Your changes will be applied.
      2. Click Save.
    4. Load access control policies on your target WebSphere Commerce Server:
      1. Copy the following access control policies into the WC_installdir \xml\policies\xml directory:
        • MyCompanyCatalogAccessControlPolicies.xml
      2. At a command prompt, navigate to the following directory: WC_installdir \bin
      3. SolarisLinuxAIX Ensure you are logged in as wasuser_ID, where wasuser_ID is the non-root user ID created before installing WebSphere Commerce. The default WebSphere Application Server user name is wasuser.
      4. SolarisLinuxAIX Ensure the four input XML files have the same permissions and ownership as other files in the WC_installdir/xml/policies/xml directory.
      5. For IBM i OS operating system Ensure you are logged in a profile that can read, write, and execute files under WC_installdir /xml/policies, WC_userdir /instances and WC_userdir /instances/instanceName/logs. For example, define the profile with USRCLS *SECOFR.
      6. Issue the acpload command:
        acpload targetDB db_user db_password inputXMLFile db_schema


        The name of your development database.
        The name of the database user.
        The password for your database user.
        The XML file containing the access control policy specification. In this case, specify MyCompanyCatalogAccessControlPolicies.xml.
        The name of the schema owner
        DB2OracleThe following example demonstrates the command with variables specified:
        acpload Demo_Dev db2admin db2admin MyCompanyCatalogAccessControlPolicies.xml DBUSER