Starting REST data services in Apache Tomcat

This topic describes how to configure and start the eXtreme Scale REST data service using Apache Tomcat, version 5.5 or later.

Before you begin

Verify that the sample eXtreme Scale grid is started. See section for details on how to start the grid.

About this task

To get started with the WebSphere eXtreme Scale REST data service using Apache Tomcat, follow these steps:

Procedure

  1. Download and install Apache Tomcat Version 5.5 or later to . For example: /opt/tomcat
  2. Install the eXtreme Scale REST data service and the provided sample into the Tomcat server as follows:
    1. If using a Sun JRE or JDK, you must install the IBM ORB into Tomcat:
      • For Tomcat version 5.5

        Copy all of the JAR files from:

        /lib/endorsed

        to

        /common/endorsed

      • For Tomcat version 6.0
        1. Create an "endorsed" directory
          • [Unix][Linux] mkdir /endorsed
          • [Windows] md /endorsed
        2. Copy all of the JAR files from:

          /lib/endorsed

          to

          /endorsed

    2. Deploy the REST data service module: wxsrestservice.war to the Tomcat server.

      Deploy the REST data service module: wxsrestservice.war to the Tomcat server.

      Copy the wxsrestservice.war file from:

      /lib

      to:

      /webapps

    3. Add the ObjectGrid client runtime JAR and the application JAR to the shared classpath in Tomcat:
      1. Edit the /conf/catalina.properties file
      2. Append the following path names to the end of the shared.loader property in the form of a comma-delimited list:
        • /lib/ogclient.jar
        • /gettingstarted/restclient/bin
        • /gettingstarted/common/bin
        Important: The path separator must be a forward slash.
  3. Start the Tomcat server with the REST data service:
    • If using Tomcat 5.5 on UNIX or Windows, or Tomcat 6.0 on UNIX:
      1. cd /bin
      2. Start the server:
        • [Unix][Linux] ./catalina.sh run
        • [Windows] catalina.bat run
      3. The console then displays the Apache Tomcat logs. When the REST data service has started successfully, the following message is displayed in the administration console:

        CWOBJ4000I: The WebSphere eXtreme Scale REST data service has been started.

    • If using Tomcat 6.0 on Windows:
      1. cd /bin
      2. Start the Apache Tomcat 6 configuration tool with the following command: tomcat6w.exe
      3. Click on the Start button on the Apache Tomcat 6 properties window to start the Tomcat server.
      4. Review the following logs to verify that the Tomcat server has started successfully:
        • /bin/catalina.log

          Displays the status of the Tomcat server engine

        • /bin/stdout.log

          Displays the system output log.

      5. When the REST data service has started successfully, the following message is displayed in the system output log: CWOBJ4000I: The WebSphere eXtreme Scale REST data service has been started.
  4. Verify that the REST data service is working:
    1. Open a browser and navigate to:

      http://localhost:8080/wxsrestservice/restservice/NorthwindGrid

      The service document for the NorthwindGrid is displayed.

    2. Navigate to:

      http://localhost:8080/wxsrestservice/restservice/NorthwindGrid/$metadata

      The Entity Model Data Extensions (EDMX) document is displayed.

  5. To stop the grid processes, use CTRL+C in the respective command window.
  6. To stop Tomcat, use CTRL +C in the window in which you started it.