Deploying the REST data service on WebSphere Application Server Community Edition

This topic describes how to configure the eXtreme Scale REST data service on WebSphere Application Server Community Edition Version 2.1.1.3 or later.

Before you begin

Procedure

  1. Configure and start an eXtreme Scale grid.
    1. For details on configuring an eXtreme Scale grid for use with the REST data service, read about .
    2. Verify that an eXtreme Scale client can connect to and access entities in the grid. For an example, see the Getting Started section of this document.

  2. Build the eXtreme Scale REST service configuration JAR or directory. See the topic for details.
  3. Start the WebSphere Application Server CE server:
    1. To start the server without Java SE security enabled, run the following command:

      [Unix][Linux] /bin/startup.sh

      [Windows] /bin/startup.bat

    2. To start the server with Java SE security enabled, follow these steps: [Unix][Linux]
      1. Open a command-line or terminal window and run the following copy command (or copy the contents of the specified policy file into your existing policy): cp /gettingstarted/wasce/geronimo.policy /bin
      2. Edit the /bin/setenv.sh file
      3. After the line that contains "WASCE_JAVA_HOME=", add the following: export JAVA_OPTS="-Djava.security.manager -Djava.security.policy=geronimo.policy"
      [Windows]
      1. Open a command-line window and run the following copy command (or copy the contents of the specified policy file into your existing policy):

        copy \gettingstarted\wasce\geronimo.policy\bin

      2. Edit the \bin\setenv.bat file
      3. After the line that contains "set WASCE_JAVA_HOME=", add the following:

        set JAVA_OPTS="-Djava.security.manager -Djava.security.policy=geronimo.policy"

  4. Add the ObjectGrid client runtime JAR to the WebSphere Application Server CE repository:
    1. Open the WebSphere Application Server CE administration console and log in. The default URL is: http://localhost:8080/console and the default userid is "system" and password is "manager".
    2. Click the "Repository" link on the left side of the console window, in the "Services" folder.
    3. In the "Add Archive to Repository" section, fill in the following into the input text boxes:
      Table 1. Add Archive to Repository
      Text box Value
      File /lib/ogclient.jar
      Group com.ibm.websphere.xs
      Artifact ogclient
      Version 7.1
      Type JAR
    4. Click the Install button

    See the following tech note for details on different ways class and library dependencies can be configured: http://www.ibm.com/support/docview.wss?uid=swg21266061

  5. Deploy and start the REST data service module: wxsrestservice.war to the WebSphere Application Server CE server.
    1. Copy and edit the sample deployment plan XML file: /gettingstarted/wasce/geronimo-web.xml to include path dependencies to your REST data service configuration JAR or directory. See section for an example on setting the classpath to include your wxsRestService.properties file and other configuration files and metadata classes.
    2. Open the WebSphere Application Server CE administration console and log in.
      Tip: The default URL is: http://localhost:8080/console. The default userid is "system" and password is "manager".
    3. Click on the "Deploy New" link on the left side of the console window.
    4. On the "Install New Applications" page, enter the following values into the text boxes:
      Table 2. Install New Applications
      Text box Value
      Archive /lib/wxsrestservice.war
      Plan /gettingstarted/wasce/geronimo-web.xml
      Tip: Use the path to the geronimo-web.xml that you copied and edited in step 3.
    5. Click on the Install button. The console page then indicates that the application was successfully installed and started.
    6. Examine the WebSphere Application Server CE system output log or console to verify that the REST data service has started successfully by verify that the following message is present:

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

  6. Start the WebSphere Application Server CE server by running the following command:
    • [Unix][Linux] /bin/startup.sh
    • [Windows] /bin/startup.bat
  7. Install the eXtreme Scale REST data service and the provided sample into the WebSphere Application Server CE server:
    1. Add the ObjectGrid client runtime JAR to the WebSphere Application Server CE repository:
      1. Open the WebSphere Application Server CE administration console and log in. (The default settings are http://localhost:8080/console/ with userid of system and password of manager.)
      2. Click the "Repository" link on the left side of the console window, in the Services folder.
      3. In the "Add Archive to Repository" section, fill in the following into the input text boxes:
        Table 3. Add Archive to Repository
        Text box Value
        File /lib/ogclient.jar
        Group com.ibm.websphere.xs
        Artifact ogclient
        Version 7.1
        Type JAR
      4. Click the install button.
        Tip: See the following technote for details on different ways class and library dependencies can be configured: http://www.ibm.com/support/docview.wss?uid=swg21266061
    2. Deploy the REST data service module: wxsrestservice.war to the WebSphere Application Server CE server.
      1. Edit the sample /gettingstarted/wasce/geronimo-web.xml deployment XML file to include path dependencies to the getting started sample classpath directories:
        • Change the "classesDirs" for the two getting started client GBeans:
        The "classesDirs" path for the GettingStarted_Client_SharedLib GBean should be set to: /gettingstarted/restclient/bin

        The "classesDirs" path for the GettingStarted_Common_SharedLib GBean should be set to: /gettingstarted/common/bin

      2. Open the WebSphere Application Server CE administration console and log in.
      3. Click on the "Deploy New" link on the left side of the console window.
      4. On the "Install New Applications" page, enter the following values into the text boxes:
        Table 4. Install New Applications
        Text box Value
        Archive /lib/wxsrestservice.war
        Plan /gettingstarted/wasce/geronimo-web.xml
      5. Click the Install button.

        The console page then indicates that the application has successfully installed and started.

      6. Examine the WebSphere Application Server CE system output log to verify that the REST data service has started successfully by verifying that the following message is present:

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

  8. Verify that the REST data service is working:

    Open a Web browser and navigate to the following URL: http://<host>:<port>/<context root>/restservice/<Grid Name>

    The default port for WebSphere Application Server CE is 8080 and is defined using the "HTTPPort" property in the /var/config/config-substitutions.properties file.

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

Results

The AtomPub service document is displayed.