Prerequisites
In order to run the examples, you must have Coherence version 3.7 and a Java
development kit (JDK) 1.6 or greater.
$COHERENCE_HOME
Make sure that the COHERENCE_HOME environment variable points to the location of the unpacked Coherence 3.7
directory.
$JAVA_HOME
Make sure that the JAVA_HOME environment variable points to the location of a 1.6 or greater JDK before
building the examples. A Java runtime 1.6 or greater is needed to run the examples.
Directory Structure
The directory structure described below is relative to the "examples" directory, the directory into which the examples were unzipped.
java/bin
Scripts for building and executing examples. There are two sets of scripts. Scripts with no file extension
are bash scripts. Scripts with a .cmd file extension are Windows command scripts. The following description
refers to the script names without specifying any file extension.
| script name |
purpose |
| run |
runs an example collection |
| run-cache-server |
run the cache "server" used for examples |
| run-proxy |
run a proxy node. Optional for some java examples; required for .NET and C++. This can only be done
after the example has been built |
java/classes
The class files output from a build. This directory will not exist until the build script is executed.
java/resource/config
The common coherence configuration files required by the examples.
java/resource/<example name>
If an example has configuration that is required instead of the common configuration, it will
have its own directory. The security example uses configuration files from java/resource/security.
$COHERENCE_HOME/lib
Coherence libraries used for compiling and running the examples.
resource
The data file used for the contacts LoaderExample: contacts.csv.
Instructions
Execute the run script. There are two parts to running the example.
contacts example
First, start one or more cache servers: "bin/run-cache-server".
Each execution will start a cache server cluster node. To add additional
nodes, execute the command in a new command shell.
Second, in a new command shell, run with the name of the example: "bin/run contacts".
The Driver.main method will run through the features of the example with output
going to the command window (stdout).
Starting with Coherence 3.7, an example of the new Query Language feature was added.
This example shows how to configure and use a simple helper class "FilterFactory" using the
Coherence InvocationService.
security example
The security example requires Coherence*Extend, which uses a proxy.
First start a proxy: "bin/run-proxy security".
Optionally, start one or more cache servers as described in the contacts example. The proxy
is storage enabled, so it will act as both a proxy and a cache server node.
Second, in a new command shell, run with the name of the example: "bin/run security".
The Driver.main method will run through the features of the example with output
going to the command window (stdout).
Prerequisites
In order to run the examples, you must have Coherence version 3.7 or later for .NET and Visual Studio 2008 or later. To run the examples, you will also need to build the Java examples. The Java version is required because the Coherence*Extend proxy and cache servers require Java. Also, the examples depend on Java example classes that must be built before running the proxy and cache server.
Directory Structure
The directory structure described below is relative to the "examples" directory.
resource
The data file used for the contacts LoaderExample: contacts.csv.
Instructions
contacts
First, following the java instructions, start a proxy server (run-proxy)
and zero or more cache servers (run-cache-server).
Second, from Visual Studio, start the contacts project without debugging or execute the contacts.exe produced
from the build in a command shell. The Driver.Main method will run through the features of the example with
the output going to the command window (stdout).
Starting with Coherence 3.7 a new example of the new Query Language feature was integrated. This example
shows how configure and use a simple helper class "FilterFactory" using the Coherence InvocationService.
security
First, following the java readme.txt instructions, start a proxy server ("java/bin/run-proxy security")
and zero or more cache servers.
Second, from Visual Studio, start the security project without debugging or execute the contacts.exe produced
from the build in a command shell. The Driver.Main method will run through the features of the example with
the output going to the command window (stdout).
Prerequisites
In order to build the examples, you must have the appropriate C++ library of Coherence version 3.7. Also you must have a C++ development environment. To run the examples, you will also need to build the Java examples. The Java version is required because the Coherence*Extend proxy and cache servers require Java. Also, the examples depend on Java example classes that must be built before running the proxy and cache server.
$COHERENCE_CPP_HOME
Make sure that the COHERENCE_CPP_HOME environment variable points to the location of the unpacked Coherence 3.7 C++ installation (or later) directory.
The supported C++ compilers are:
- Windows - Microsoft Visual C++ Express/Studio 2008 or later or the equivalent Platform SDK.
- Linux - g++ 4.0
- Mac - g++ 4.0
- Solaris - CC ?
Directory Structure
The directory structure described below is relative to the "examples" directory.
cpp/bin
Scripts for building and executing the examples. Scripts with no file extension are bash scripts. Scripts with a .cmd file extension are Windows command scripts. The following description refers to the script names without specifying any file extension.
run -- runs an example, requires that java/bin/run-proxy is started.
cpp
All example source organized under the contacts and model directories.
contact/out
The object files output from a build. This directory will not exist until the build script is executed.
resource
The data file used for the contacts LoaderExample: contacts.csv.
cpp/contacts
contains the contacts example sources.
cpp/security
contains the security example sources.
cpp/pof
contains the datamodel sources and any classes that require serialization.
$COHERENCE_CPP_HOME/include
Contains the Coherence header files.
$COHERENCE_CPP_HOME/lib
Contains the Coherence library.
Instructions
Execute the run scripts. There are two parts to running the example. From within new command shells:
contacts example
First, start one proxy server: "java/bin/run-proxy contacts".
Optionally, start one or more cache servers: "bin/run-cache-server".
Each execution will start a cache server cluster node. To add additional nodes, execute the command in
a new command shell.
Second, in a new command shell, execute run with the name of the example:
Windows
Type bin\run.cmd contacts
Linux/Mac and Solaris
Type bin/run contacts
The Driver.main method will run through the features of the example with output
going to the command window (stdout).
Starting with Coherence 3.7, an example of the new Query Language feature was added.
This example shows how to configure and use a simple helper class "FilterFactory" using the
Coherence InvocationService.
security example
First, start one proxy server: "java/bin/run-proxy security".
Optionally, start one or more cache servers: "bin/run-cache-server".
Each execution will start a cache server cluster node. To add additional nodes, execute the command in
a new command shell.
Second, in a new command shell, execute run with the name of the example:
Windows
Type bin\run.cmd security
Linux/Mac and Solaris
Type bin/run security
The Driver.main method will run through the features of the example with output
going to the command window (stdout).