To run the sample client application, you must start a
catalog server and a container server.
The
env.sh|bat script is called by the
other scripts to set needed environment variables. Normally you do
not need to change this script.
To run the application, you must first start the catalog
service process. The catalog service is the control center of the
data grid. The catalog service tracks the locations of container servers,
and controls the placement of data to host container servers. After
the catalog service starts, you can start the container servers, which
store the application data for the data grid. To store multiple copies
of the data, you can start multiple container servers. When all the
servers are started, you can run the client application to insert,
update, remove, and get data from the data grid.
- Open a terminal session or command-line window.
- In a terminal session or command line window, navigate
to the wxs_install_root/ObjectGrid/gettingstarted directory of your server installation.
- Run the following script to start a catalog service process
on localhost:
![[Unix]](./icons/ngunix.gif)
./startcat.sh
startcat.bat
The catalog service process runs in the current terminal window.
You can also start the catalog service with the
startXsServer command. Run the
startXsServer from the
wxs_install_root/ObjectGrid/bin directory:
![[Unix]](./icons/ngunix.gif)
![[Linux]](./icons/nglinux.gif)
./startXsServer.sh
cs0 -catalogServiceEndPoints cs0:localhost:6600:6601 -listenerPort
2809
![[Windows]](./icons/ngwin.gif)
startXsServer.bat
cs0 -catalogServiceEndPoints cs0:localhost:6600:6601 -listenerPort
2809
- Open another terminal session or command-line window, and
run the following command to start a container server instance:
![[Unix]](./icons/ngunix.gif)
./startcontainer.sh server0
startcontainer.bat server0
The container server runs in the current terminal window.
If you want to start more container server instances to support replication,
you can repeat this step with a different server name.
You can
also start container servers with the
startXsServer command. Run the
startXsServer command from the
wxs_install_root/ObjectGrid/bin directory:
![[Unix]](./icons/ngunix.gif)
![[Linux]](./icons/nglinux.gif)
./startXsServer.sh
c0 -catalogServiceEndPoints localhost:2809 -objectgridFile ../gettingstarted/server/config/objectgrid.xml
-deploymentPolicyFile ../gettingstarted/server/config/deployment.xml
![[Windows]](./icons/ngwin.gif)
startXsServer.bat
c0 -catalogServiceEndPoints localhost:2809 -objectgridFile ..\gettingstarted\server\config\objectgrid.xml
-deploymentPolicyFile ..\gettingstarted\server\config\deployment.xml
![[Java programming language only]](./icons/ngjava.gif)
Optional: Instead of starting the catalog and container servers separately,
you can use the runall script to start a catalog
server, container server, and Java™ sample client application in the same Java virtual machine.
Restriction: Because the runall script runs embedded container servers, you cannot use the monitoring
console to monitor your environment. Statistics are not collected
for the container servers.