F.2. GemStone Gemfire Integration
Prev | Appendix F. DataCache Integrations | Next

## F.2. GemStone Gemfire Integration

The Kodo JDO data cache can integrate with GemStone's GemFire v3.5.1 caching system. later. 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.3. GemFire Cache Configuration

kodo.properties

    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:

- Your Application ID classes must be serializable (this is a JDO requirement also).

- Your classes used in fields that have externalizers or custom field mappings must also be serializable.

- The Kodo option of `kodo.DynamicDataStructs` isn't currently supported with the GemFire integration.

Prev | Up | Next
Appendix F. DataCache Integrations | Home | Appendix G. Development and Runtime Libraries