Deploying the customized code

Once the customization has been completed and tested, you are ready to deploy your custom code to a target WebSphere Commerce Server and implement the customization on a live site.

About this task

Deploying to the server involves exporting code from the WebSphere Commerce development environment and deploying code into the target WebSphere Commerce Server.


  1. Export code from the WebSphere Commerce development environment
    1. To 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. To export the WebSphereCommerceServerExtensionsLogic project:
      1. In WebSphere Commerce Developer, switch to the Enterprise Explorer view. Navigate to WebSphereCommerceServerExtensionsLogic; right-click then click Export. The Export wizard opens.
      2. In the Export wizard:
        1. Select Java > JAR file and click Next. The project WebSphereCommerceServerExtensionsLogic is selected by default. Leave this value selected.
        2. In the right pane, ensure that resources that begin with a period are not selected. For example:
          • .classpath
          • .factorypath
          • .project
        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 Driver:\ExportTemp\WebSphereCommerceServerExtensionsLogic.jar.
        6. Click Finish.
    3. To export DSL extension configuration files:

      For XML configuration files, copy the assets to the directory you are using to build your deployment package. The structure under this directory must match the structure that you want inside the EAR file.

      1. In the file system, navigate to your temporary directory. For instance, drive:\ExportTemp.
      2. Create a directory like xml\config\
      3. Copy the files under driver:\WCDE_installdir\workspace\WC\xml\config\ into driver:\ExportTemp\xml\config\ For this tutorial, the file included is only wc-business-object-mediator.xml.
  2. Deploy code into the target WebSphere Commerce Server
    1. To deploy LOBTools.war:
      1. In the WebSphere Application Server, select administrative console. Expand Applications > Enterprise Applications.
      2. In the Application name field, type an application name. For example, WC_demo, and click Update.
      3. Select Single module and change the Specify path to your path.

      4. Select Detailed - Show all installation options and parameters. Do not use the default Fast Path.
      5. In the next screen, do not make any changes and click Next.
      6. Click Continue on the following screen.
      7. To map the module to the servers, select the Module, press CTRL and select Clusters and Servers that are running your WebSphere Commerce application and click Apply.

      8. Select Virtual host.

      9. Click Next, and then click OK.
      10. After the update has completed successfully, click Save to Master Configuration.
    2. To deploy the WebSphereCommerceServerExtensionsLogic.jar file and XML config files:
      1. Package the WebSphereCommerceServerExtensionsLogic.jar file and the xml directory in a .zip file, for example,
      2. In the WebSphere Application Server administrative console, select Applications > Application Types > WebSphere Enterprise Applications.
      3. Select the application name, for example, WC_demo; then click Update.
      4. Click Replace, add, or delete multiple files.
      5. In the Specify the path to the file section, select Local file system and click Browse; then specify the path drive:\ImportTemp\
      6. Click Next.
      7. Click OK.
      8. After the update has completed successfully, click Save to Master Configuration.
      9. Click Save.
    3. Restart the Server.