The attached example consists of two basic components, one written in Java and the other written in C+, and demonstrates how to access Coherence cache from a C+ application through JNI. The sources found in the src\java directory contain a very simple value object implementation (Account). The sources found in the src\cpp directory contain a simple C++ command line application that populates and accesses a clustered Coherence cache via JNI.
This information is also included in the README.txt file in the attached archive.
C++ to Coherence Example using JNI
This example demonstrates how to access Coherence cache from a C++ application.
Prerequisites
To build the example, you must have the following software installed:
Build Instructions
- Update set-env.cmd to reflect your system environment.
- Open a shell and execute the following command in the cppclient directory:
./build.sh
Running the Example
- Start the Coherence cluster by executing the following script:
./runserver.sh
- Start the example C++ client application by executing the following script:
./runcppclient.sh