Deploying the REST data service on Apache Tomcat
This topic describes how to configure theWebSphere® eXtreme Scale REST data service on Apache Tomcat Version 5.5 or later.
About this task
- An IBM® or Oracle JRE or JDK, Version 6 or later installed and a specified JAVA_HOME environment variable.
- Apache Tomcat Version 5.5 or later is installed. See Apache Tomcat for details on how to install Tomcat.
- A stand-alone installation of WebSphere eXtreme Scale.
Procedure
-
If using an Oracle JRE or JDK, install the IBM ORB into
Tomcat:
-
Tomcat version 5.5:
Copy all of the JAR files from:
the wxs_home/lib/endorsed directory
to:
the tomcat_root/common/endorsed directory
-
Tomcat version 6.0:
Create an "endorsed" directory:
mkdir tomcat_root/endorsed
md tomcat_root/endorsed
Copy all of the JAR files from:
wxs_home/lib/endorsed
to:
tomcat_root/common/endorsed
-
Tomcat version 5.5:
-
Configure and start a data grid.
- For details on configuring a data grid for use with the REST data service, see Configuring.
- Verify that an eXtreme Scale client can connect to and access entities in the grid. For an example, see Configuring REST data services.
- Build the eXtreme Scale REST service configuration JAR or directory. See the packaging and deployment information in Installing the REST data service for details.
- Deploy the REST data service module: wxsrestservice.war to the Tomcat server.
-
Add the ObjectGrid client runtime JAR and the application JAR to the shared classpath in
Tomcat:
- Edit the tomcat_root/conf/catalina.properties file
-
Append the following path names to the end of the shared.loader property, separating each path
name with a comma:
- wxs_home/lib/ogclient.jar
- restservice_home/gettingstarted/restclient/bin
- restservice_home/gettingstarted/common/bin
-
If you are using Java™ 2 security, add security
permissions to the tomcat policy file:
- If using Tomcat version 5.5:
Merge the contents of the sample 5.5 catalina policy file found in
restservice_home/gettingstarted/tomcat/catalina-5_5.policy with the tomcat_root/conf/catalina.policy file.
- If using Tomcat version 6.0:
Merge the contents of the sample 6.0 catalina policy file found in
restservice_home/gettingstarted/tomcat/catalina-6_0.policy with the tomcat_root/conf/catalina.policy file.
- If using Tomcat version 5.5:
-
Start the Tomcat server:
-
If using Tomcat 5.5 on UNIX or Windows, or the Tomcat 6.0 ZIP distribution:
- cd tomcat_root/bin
- Start the server:
- Without Java 2 security enabled:
./catalina.sh run
catalina.bat run
- With Java 2 security enabled:
./catalina.sh run -security
catalina.bat run -security
- Without Java 2 security enabled:
- The Apache Tomcat logs are displayed to the console. When the REST data service has started
successfully, the following message is displayed in the administrative
console:
CWOBJ4000I: The WebSphere eXtreme Scale REST data service has been started.
-
If using Tomcat 6.0 on Windows using the Windows installer distribution:
- cd /bin
- Start the Apache Tomcat 6 configuration tool:
tomcat6w.exe
- To enable Java 2 security (optional):
Add the following entries to the Java Options in the Java tab in the Apache Tomcat 6 properties window:
-Djava.security.manager
-Djava.security.policy=\conf\catalina.policy
- Click on the Start button on the Apache Tomcat 6 properties window to start the Tomcat server.
- Review the following logs to verify that the Tomcat server has started successfully:
- tomcat_root/bin/catalina.log
Displays the status of the Tomcat server engine
- tomcat_root/bin/stdout.log
Displays the system output log
- tomcat_root/bin/catalina.log
- 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.
-
-
Verify 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 Tomcat is 8080 and is configured in the tomcat_root/conf/server.xml file in the <Connector> element.
For example:http://localhost:8080/wxsrestservice/restservice/NorthwindGrid/