Deploying the component facade
After you test, you are ready to deploy the component facade to your WebSphere Commerce Server.
Before you begin
Procedure
-
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 that is used to enable the service module for web services over HTTP. Export this project as a WAR file. (Optional) MyServiceModuleServicesJMSInterface An EJB module that is used to enable the service module for web services over JMS. Export this project as an EJB JAR file. -
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.
- In the Enterprise Explorer, right-click MyServiceModuleName-Server and select Properties from the menu.
- Select Java EE Module Dependencies from the Navigation tab.
- Select the following files: Foundation-Core.jar, Foundation-DataObjects.jar, Foundation-Extension.jar, Foundation-Server.jar, MyServiceModuleName-Client.jar, MyServiceModuleName-DataObjects.jar
- Click Ok
-
Deploy the WAR module through the WebSphere Application Server administrative console:
- Select
- Select the WebSphere Commerce instance and click Update.
- Select Single Module.
- In the Relative Path field, type MyServiceModule-ServicesHTTPInterface.war.
- Select Local file system and specify the location of the WAR file.
- In the Context root field type /webapp/wcs/component/MyServiceModule. Click Next.
- Accept the defaults and click Next again.
- Click Continue to go through security warnings.
- Accept defaults on Step 1 and click Next.
- Select both options under Clusters and Servers, select MyServiceModule-ServicesHTTPInterface module, and click Apply. Click Next.
- Select MyServiceModule-ServicesHTTPInterface module and select VH_ instance_name as the virtual host.
- Click Next. Click Finish. Click Save to Master Configuration.
- Optional:
Deploy MyServiceModuleServicesJMSInterface.jar through
the administrative console:
- Select .
- Select the WebSphere Commerce instance and click Update.
- Select Single Module.
- Specify Relative Path as MyServiceModuleServicesJMSInterface.jar.
- Select Local file system and specify the location of the JAR file.
- Leave Context root blank. Click Next.
- Accept the defaults and click Next again.
- Click Continue to go through security warnings.
- Accept the defaults on Step 1 and click Next.
- Select both options under Clusters and Servers, select MyServiceModuleServicesJMSInterface Module, and click Apply. Click Next.
- Accept defaults and click Next.
- Accept defaults and click Next.
- Click Finish.
- Click Save to Master Configuration.
-
Deploy the EJB Module MyServiceModule-Server through the WebSphere
Application Server administrative console:
- Select Replace or add a single module. Specify MyServiceModule-Server.jar EJB file name as the path and click Next
- Select the Detailed installation type and then merge new and existing bindings and click Next.
- On the Application Security Warnings, select Continue.
- Leave all Deployment options cleared and click Next on the Installation Options pane.
- Select the check box for the Module and highlight both server1 and webserver1 to map modules to servers and click Apply. Click Next
- Provide JNDI Names for beans. Accept Defaults, click Next.
- Map resource references to resources.
- Select the check box for both MyServiceModuleName and MyServiceModuleNameServicesImpl, and click Set Multiple JNDI Names. Select jdbc/WebSphere Commerce DB2 DataSource demo from the list. Click Next.
- Ensure that all unprotected 2.x methods have the correct level of protection. Leave defaults options and click Next.
- Click Finish on the Summary Page.
- Click Manage Applications (Defer saving until after step 7).
-
Deploy MyServiceModule-Client.jar and
MyServiceModule-DataObjects.jar through the administrative
console:
- Select the check box for WC_demo and click Update.
- Select Replace or add a single file.
- Specify Relative Path as MyServiceModuleName-Client.jar (or MyServiceModule-DataObjects.jar).
- Specify the path to the file on the local file system and click Next.
- Verify the name and click OK.
- When the deployment finishes, click Manage Applications and repeat the process for the MyServiceModule-DataObjects.jar
- Click Manage Applications (Defer saving until after step 7)
-
Add the Service Module configuration to the runtime server:
- Create a compressed file with the following structure: xml\config\com.mycompany.commerce.myservicemodule including both SDO.properties and wc-component-client.xml
- Select Replace, Add or Delete Multiple Files
- Deploy the SDO.properties and wc-component-client.xml files through the WebSphere Application Server administrative console as a Multiple File Update:
- If you are deploying an SOI Module, add the Service Module message mapping updates.
- Save to Master Configuration
- Add the Service Module command registry updates. You can find the generated sample registry SQL in the Rational Application Developer Enterprise Explorer under,
-
Generate a new web server plug-in:
- Open the WebSphere Application Server administrative console.
- Select .
- Select webserver1.
- Click Generate Plug-in.
- Restart the web server.
- Restart the WebSphere Commerce Server.