To run the distributed ObjectGrid sample, you must start an ObjectGrid
cluster that hosts the required ObjectGrid.
Before you begin
Verify that WebSphere Extended Deployment for Mixed Server Environment,
Version 6.0.x is installed.
Procedure
- Locate the objectgridSamples.jar file in the mse_install_root/ObjectGrid/samples directory.
- Extract the META-INF/cluster-config-1.xml file and the META-INF/cluster-objectgrid-definition.xml file
from the objectgridSamples.jar file to the mse_install_root/ObjectGrid/samples directory.
- Verify that the JAVA_HOME environment variable is set and that
the Java version meets the requirement. The ObjectGrid server requires
a Java 2 Platform, Standard Edition (J2SE) Version 1.4.2 or later environment.
To check your Java environment, perform the following steps:
- Check the JAVA_HOME environment variable. On a command-line
prompt, issue the following command:
echo %JAVA_HOME%
This command
displays the path to the Java directory. If you need to set the JAVA_HOME
environment variable, run the following command: set JAVA_HOME=JDK_INSTALL_ROOT
Set the JDK_INSTALL_ROOT to your Java installation
directory, for example, c:\java.
- Check your Java version. Run the following command:
java -version
Verify
that your version is Java 2 Platform, Standard Edition (J2SE) Version 1.4.2
or later.
- Start the ObjectGrid server. On a command-line prompt,
issue the following commands:
cd mse_install_root/ObjectGrid/bin
startOgServer.bat server1 -objectgridFile mse_install_root/ObjectGrid/
samples/META-INF/cluster-objectgrid-definition.xml
-clusterFile mse_install_root/ObjectGrid/samples/META-INF/
cluster-config-1.xml
-jvmArgs -cp mse_install_root/ObjectGrid/samples/objectgridSamples.jar
Important: You must specify the objectgridSamples.jar file
in the class path through the -jvmArgs option. The objectgridSamples.jar file
contains classes that the sample ObjectGrid server needs for the plug-in implementations
that are defined in the cluster-objectgrid-definition.xml file. This
Java archive (JAR) file is also used for serializing and deserializing the
objects that are stored in maps.
The system displays
output that is similar to the following text. This output is shortened for
publishing purposes:************ Start Display Current Environment ************
[1/17/06 14:04:34:144 CST] 7daee176 Launcher
I CWOBJ2501I: Launching ObjectGrid server server1.
:
[1/17/06 14:04:37:719 CST] 7daee176 ServerRuntime
I CWOBJ1001I: ObjectGrid Server server1 is ready to process requests.
Results
You started an ObjectGrid cluster that hosts the required ObjectGrid,
so you can run the distributed ObjectGrid sample application.