Administration guide > Configure the deployment environment > Configuring data grids

Configure local deployments

A local in-memory eXtreme Scale configuration can be created by using an ObjectGrid descriptor XML file or eXtreme Scale APIs.

The following companyGrid.xml file is an example of an ObjectGrid descriptor XML. The first few lines of the file include the required header for each ObjectGrid XML file. The file defines an ObjectGrid instance named "CompanyGrid" and several BackingMaps named "Customer," "Item," "OrderLine," and "Order."

companyGrid.xml file
<?xml version="1.0" encoding="UTF-8"?>
<objectGridConfig xmlns:xsi=""
    xsi:schemaLocation=" ../objectGrid.xsd"

        <objectGrid name="CompanyGrid">
            <backingMap name="Customer" />
            <backingMap name="Item" />
            <backingMap name="OrderLine" />
            <backingMap name="Order" />


Pass the XML file to one of the createObjectGrid methods in the ObjectGridManager interface. The following code sample validates the companyGrid.xml file against the XML schema, and creates the ObjectGrid instance named "CompanyGrid." The newly created ObjectGrid instance is not cached.

ObjectGridManager objectGridManager = ObjectGridManagerFactory.getObjectGridManager();
ObjectGrid companyGrid = objectGridManager.createObjectGrid("CompanyGrid", 
    new URL("file:etc/test/companyGrid.xml"), true, false);

As an alternative, you can create ObjectGrid instances programmatically without any XML. For example, you can use the following code snippet in place of the previous XML and code.

ObjectGridManager objectGridManager = ObjectGridManagerFactory.getObjectGridManager();
ObjectGrid companyGrid = objectGridManager.createObjectGrid ("CompanyGrid", false);
BackingMap customerMap= companyGrid.defineMap("Customer");
BackingMap itemMap= companyGrid.defineMap("Item");
BackingMap orderLineMap= companyGrid.defineMap("OrderLine");
BackingMap orderMap = companyGrid.defineMap("Order");

For a complete description of the ObjectGrid XML file, see the eXtreme Scale configuration reference.

Parent topic:

Configure data grids

Related concepts

Plug-ins for indexing data

Configure loaders

Configure write-behind loader support

Cache topology

Related tasks

Configure evictors

Configure a locking strategy

Configure peer-to-peer replication with JMS

Related reference

ObjectGrid descriptor XML file

objectGrid.xsd file

Configure distributed deployments


Search Tips   |   Advanced Search