F.2. GemStone Gemfire Integration

The Kodo JDO data cache can integrate with GemStone's GemFire caching system. To use GemFire in Kodo you will need to change your gemfire.properties to have the property enable-shared-memory=true. You will also need to add both Kodo and GemFire to your classpath and then start a GemFire server.

    prompt> gemfire start

By default, the GemFire data cache will use a GemFire region of root/kodo-data-cache and the GemFire query cache will use a region of root/kodo-query-cache. This can be changed be setting the optional property GemfireCacheName.

Example F.2. GemFire Cache Configuration

kodo.DataCache: gemfire(GemfireCacheName=/root/My-kodo-data-cache)
kodo.QueryCache: gemfire(GemfireCacheName=/root/My-kodo-query-cache)

cache.xml

    ...
    <shared-root-region name="root">
        <region-attributes>
        ...
        </region-attributes>
        <region name="My-kodo-data-cache">
            <region-attributes>
            </region-attributes>
        </region>
        <region name="My-kodo-query-cache">
            <region-attributes>
            </region-attributes>
        </region>
    </shared-root-region>
    ...

If you set GemFire for both kodo.DataCache and kodo.QueryCache you aren't required to specify a kodo.RemoteCommitProvider unless you are registering your own RemoteCommitListeners.

Some notes regarding using GemFire with Kodo: