[Java programming language only]

Deploying the REST data service on WebSphere Application Server Community Edition

You can configure the eXtreme Scale REST data service on WebSphere® Application Server Community Edition Version 2.1.1.3 or later.

Before you begin

  • An IBM® (recommended) or Oracle JRE or JDK, Version 6 or later is installed and the JAVA_HOME environment variable is set.
  • Download and install WebSphere Application Server Community Edition Version 2.1.1.3 or later to the wasce_root directory, for example the /opt/IBM/wasce directory. Read the installation instructions for information on version 2.1.1 or other versions.

Procedure

  1. Configure and start a data grid.
    1. For details on configuring an eXtreme Scale data grid for use with the REST data service, read about Starting a stand-alone data grid for REST data services.
    2. Verify that an eXtreme Scale client can connect to and access entities in the data grid. For an example, see Tutorial: Getting started with WebSphere eXtreme Scale.
  2. Build the eXtreme Scale REST service configuration JAR or directory. See the packaging and deployment information in the Installing the REST data service topic for details.
  3. Start the WebSphere Application Server Community Edition server:
    1. To start the server without Java™ SE security enabled, run the following command:

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

      [Windows]wasce_root/bin/startup.bat

    2. To start the server with Java SE security enabled, follow these steps:
      [Linux][Unix]
      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 restservice_home/gettingstarted/wasce/geronimo.policy wasce_root/bin
      2. Edit the wasce_root/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 restservice_home\gettingstarted\wasce\geronimo.policy\bin

      2. Edit the wasce_root\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 Community Edition repository:
    1. Open the WebSphere Application Server Community Edition 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 wxs_home/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: Specifying external dependencies to applications running on WebSphere Application Server Community Edition.

  5. Deploy and start the REST data service module, the wxsrestservice.war file, to the WebSphere Application Server Community Edition server.
    1. Copy and edit the sample deployment plan XML file: restservice_home/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 Community Edition 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 Newlink 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 restservice_home/lib/wxsrestservice.war
      Plan restservice_home/gettingstarted/wasce/geronimo-web.xml
      Tip: Use the path to the geronimo-web.xml file 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 Community Edition system output log or console to verify that the REST data service has started successfully. The following message must appear:

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

  6. Start the WebSphere Application Server Community Edition server by running the following command:
    • [Linux][Unix]wasce_root/bin/startup.sh
    • [Windows]wasce_root/bin/startup.bat
  7. Install the eXtreme Scale REST data service and the provided sample into the WebSphere Application Server Community Edition server:
    1. Add the ObjectGrid client runtime JAR to the WebSphere Application Server Community Edition repository:
      1. Open the WebSphere Application Server Community Edition administration console and log in. The default URL is: http://localhost:8080/console. 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 3. Add Archive to Repository
        Text box Value
        File wxs_home/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: Specifying external dependencies to applications running on WebSphere Application Server Community Edition
    2. Deploy the REST data service module: wxsrestservice.war to the WebSphere Application Server Community Edition server.
      1. Edit the sample restservice_home/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: restservice_home/gettingstarted/restclient/bin

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

      2. Open the WebSphere Application Server Community Edition 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 restservice_home/lib/wxsrestservice.war
        Plan restservice_home/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 Community Edition 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 Community Edition 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.