Connecting to a distributed ObjectGrid

You can connect to a distributed ObjectGrid with a connection end point for the catalog service.  You must have the host name and endpoint port of the catalog server to which you want to connect.

In order to connect to a distributed grid, you must have configured your server-side environment with a catalog service and container servers.

The getObjectGrid(ClientClusterContext ccc, String objectGridName) method connects to the specified catalog service and returns a client ObjectGrid instance corresponding to a server-side ObjectGrid instance.

The following code snippet is an example of how to connect to a distributed grid.

				// Create an ObjectGridManager instance.

				ObjectGridManager ogm = ObjectGridManagerFactory.getObjectGridManager();

				// Obtain a ClientClusterContext by connecting to a catalog 
				// server based distributed ObjectGrid.  You have to provide
				// a connection end point for your catalog server in the format
				// of hostName:endPointPort.  The hostName is the machine
				// where the catalog server resides, and the endPointPort is
				// the catalog server's listening port, whose default is 2809.

				ClientClusterContext ccc = ogm.connect("localhost:2809", null, null);

				// Obtain a distributed ObjectGrid using ObjectGridManager and providing
				// the ClientClusterContext.

				ObjectGrid og = ogm.getObjectGrid(ccc, "objectgridName");

New! Subscribe to Information Center updates

rss feed You can now subscribe to updates for the WebSphere eXtreme Scale Information Center. This feed includes a description of the changes that occur in the monthly refreshes. Use the RSS feed to subscribe to changes using your favorite feed reader.