Administration guide > Configure the deployment environment > Configuring the REST data service > Install the REST data service



Deploy the REST data service on WAS Community Edition

This topic describes how to configure the eXtreme Scale REST data service on WAS Community Edition v2.1.1.3 or later.


Before you begin


Procedure

  1. Configure and start an eXtreme Scale data grid.

    1. For details on configuring an eXtreme Scale data grid for use with the REST data service, read about Configure the deployment environment.

    2. Verify that an eXtreme Scale client can connect to and access entities in the data grid. For an example, see REST data services sample and tutorial.

  2. Build the eXtreme Scale REST service configuration JAR or directory. See the packaging and deployment information in the Install the REST data service topic for details.

  3. Start the WAS Community Edition server:

    1. To start the server without Java™ SE security enabled, run the following command:

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

      [Windows] wasce_root/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 the 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 the 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 WAS Community Edition repository:

    1. Open the WAS 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: Specify external dependencies to applications running on WAS Community Edition.

  5. Deploy and start the REST data service module, the wxsrestservice.war file, to the WAS 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 the REST data service configuration JAR or directory. See section for an example on setting the classpath to include the wxsRestService.properties file and other configuration files and metadata classes.

    2. Open the WAS 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 WAS 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 WAS Community Edition server...

    • [Unix][Linux] 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 WAS Community Edition server:

    1. Add the ObjectGrid client runtime JAR to the WAS Community Edition repository:

      1. Open the WAS 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: Specify external dependencies to applications running on WAS Community Edition

    2. Deploy the REST data service module: wxsrestservice.war to the WAS 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 WAS Community Edition administration console and log in.

      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 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 WAS 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 WAS 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.


Parent topic:

Install the REST data service


Related tasks

Deploy the REST data service on WAS

Deploy the REST data service on Apache Tomcat

Secure the REST data service

Configure the REST data service

Administer the REST data service

Install the REST data service

Related reference

REST data service properties file