Use this task to start a simple ObjectGrid cluster to test the
functionality of the distributed ObjectGrid in the WebSphere Application Server
environment.
About this task
Use this task to set up an application server to host an ObjectGrid
server that is based on the
cluster-config-1.xml and
cluster-objectgrid-definition.xml files.
The cluster-config-1.xml file has one ObjectGrid server definition
only. This ObjectGrid server represents the sample ObjectGrid cluster. You
can use either one stand-alone application server or a cluster with one cluster
member to host the sample ObjectGrid server.
Procedure
- Extract both the META-INF/cluster-config-1.xml and META-INF/cluster-objectgrid-definition.xml files from the /optionalLibraries/ObjectGrid/objectgridSamples.jar file
to the /optionalLibraries/ObjectGrid directory.
- Define the necessary generic Java virtual machine (JVM) arguments.
- In the administrative console, click Servers > Application
servers > server_name > Process Definition > Java Virtual Machine.
- In the Generic JVM arguments panel, type the following text:
-Dobjectgrid.server.name=server1
-Dobjectgrid.xml.url=file:///<INSTALL_ROOT>\optionalLibraries\ObjectGrid\
META-INF\cluster-objectgrid-definition.xml
-Dobjectgrid.cluster.xml.url=file:///<INSTALL_ROOT>\optionalLibraries\
ObjectGrid\META-INF\cluster-config-1.xml
The INSTALL_ROOT is
your WebSphere Application Server installation root directory.
- Click Save.
- Click Save to Master Configuration.
- Select the Synchronize changes with Nodes option. Click Save.
- Copy the /optionalLibraries/ObjectGrid/objectgridSamples.jar file
to the /classes or the lib/ext directory.
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 .
- Restart the server for the changes to take effect.
Results
You started an ObjectGrid cluster in the WebSphere Application Server
environment.