Deploy the component facade

After you test, we are ready to deploy the component facade to the WebSphere Commerce Server.


Before beginning


Procedure

  1. Export all projects (except the unit tests project) from the service module:

    Option Description
    MyServiceModule-Client Contains the client library Java code. Export this project as a JAR file.
    MyServiceModule-DataObjects Contains the XSD, WSDL, and generated SDOs. Export this project as a JAR file.
    MyServiceModule-Server Contains the component facade implementation. Export this project as an EJB JAR file.
    MyServiceModuleServicesHTTPInterface A web module used to enable the service module for web services over HTTP. Export this project as a WAR file.
    (Optional) MyServiceModuleServicesJMSInterface An EJB module used to enable the service module for web services over JMS. Export this project as an EJB JAR file.

  2. Ensure that the MANIFEST.MF file inside your MyServiceModule-Server.jar file includes the following entries:

      Foundation-Core.jar
      Foundation-DataObjects.jar
      Foundation-Extension.jar
      Foundation-Server.jar
      MyServiceModuleName-Client.jar
      MyServiceModuleName-DataObjects.jar

    If it does not contain the preceding entries, follow these instructions to update the Module Dependencies, and export the project again.

    1. In the Enterprise Explorer, right-click MyServiceModuleName-Server and select Properties from the menu.

    2. Select Java EE Module Dependencies from the Navigation tab.

    3. Select the following files: Foundation-Core.jar, Foundation-DataObjects.jar, Foundation-Extension.jar, Foundation-Server.jar, MyServiceModuleName-Client.jar, MyServiceModuleName-DataObjects.jar

    4. Click Ok

  3. Deploy the WAR module through the WebSphere Application Server Administrative Console:

    1. Select Applications > Enterprise Applications.

    2. Select the WebSphere Commerce instance and click Update.

    3. Select Single Module.

    4. In the Relative Path field, type MyServiceModule-ServicesHTTPInterface.war.

    5. Select Local file system and specify the location of the WAR file.

    6. In the Context root field type /webapp/wcs/component/MyServiceModule. Click Next.

    7. Accept the defaults and click Next again.

    8. Click Continue to go through security warnings.

    9. Accept defaults on Step 1 and click Next.

    10. Select both options under Clusters and Servers, select MyServiceModule-ServicesHTTPInterface module, and click Apply. Click Next.

    11. Select MyServiceModule-ServicesHTTPInterface module and select VH_ instance_name as the virtual host.

    12. Click Next. Click Finish. Click Save to Master Configuration.

  4. Optional: Deploy MyServiceModuleServicesJMSInterface.jar through the administrative console:

    1. Select Applications > Enterprise Applications.

    2. Select the WebSphere Commerce instance and click Update.

    3. Select Single Module.

    4. Specify Relative Path as MyServiceModuleServicesJMSInterface.jar.

    5. Select Local file system and specify the location of the JAR file.

    6. Leave Context root blank. Click Next.

    7. Accept the defaults and click Next again.

    8. Click Continue to go through security warnings.

    9. Accept the defaults on Step 1 and click Next.

    10. Select both options under Clusters and Servers, select MyServiceModuleServicesJMSInterface Module, and click Apply. Click Next.

    11. Accept defaults and click Next.

    12. Accept defaults and click Next.

    13. Click Finish.

    14. Click Save to Master Configuration.

  5. Deploy the EJB Module MyServiceModule-Server through the WebSphere Application Server Administrative Console:

    1. Select Replace or add a single module. Specify MyServiceModule-Server.jar EJB file name as the path and click Next

    2. Select the Detailed installation type and then merge new and existing bindings and click Next.

    3. On the Application Security Warnings, select Continue.

    4. Leave all Deployment options cleared and click Next on the Installation Options pane.

    5. Select the check box for the Module and highlight both server1 and webserver1 to map modules to servers and click Apply. Click Next

    6. Provide JNDI Names for beans. Accept Defaults, click Next.

    7. Map resource references to resources.

    8. Select the check box for both MyServiceModuleName and MyServiceModuleNameServicesImpl, and click Set Multiple JNDI Names. Select jdbc/WCDataSource from the list. Click Next.

    9. Ensure that all unprotected 2.x methods have the correct level of protection. Leave defaults options and click Next.

    10. Click Finish on the Summary Page.

    11. Click Manage Applications (Defer saving until after step 7).

  6. Deploy MyServiceModule-Client.jar and MyServiceModule-DataObjects.jar through the administrative console:

    1. Select the check box for WC_demo and click Update.

    2. Select Replace or add a single file.

    3. Specify Relative Path as MyServiceModuleName-Client.jar (or MyServiceModule-DataObjects.jar).

    4. Specify the path to the file on the local file system and click Next.

    5. Verify the name and click OK.

    6. When the deployment finishes, click Manage Applications and repeat the process for the MyServiceModule-DataObjects.jar

    7. Click Manage Applications (Defer saving until after step 7)

  7. Add the Service Module configuration to the runtime server:

    1. Create a compressed file with the following structure:xml\config\com.mycompany.commerce.myservicemodule including both SDO.properties and wc-component-client.xml

    2. Select Replace, Add or Delete Multiple Files

    3. Deploy the SDO.properties and wc-component-client.xml files through the WebSphere Application Server Administrative Console as a Multiple File Update:

    4. If we are deploying an SOI Module, add the Service Module message mapping updates.

    5. Save to Master Configuration

    6. Add the Service Module command registry updates. We can find the generated sample registry SQL in the Rational Application Developer Enterprise Explorer under, MyServiceModuleName-Server > SampleData > cmdreg.xml

  8. Generate a new web server plug-in:

    1. Open the WebSphere Application Server Administrative Console.

    2. Select Servers > Web servers.

    3. Select webserver1.

    4. Click Generate Plug-in.

    5. Restart the web server.

    6. Restart the Transaction Server.


Related concepts
Command, view, and URL registries
Message mappers


Related tasks
Creating the component facade