The Coherence Incubator Examples project provides a collection of examples that demonstrate how to use various Incubator patterns. The current release of the examples project includes:
This project only depends on the required Coherence versions and the underlying incubator patterns. All current patterns will ship with the Incubator Example project.
The Incubator examples project provides a set of in depth examples relating to individual projects along with the infrastructure to easily execute them. The distribution ships with 4 main directories:
The Incubator examples require a supported copy of Coherence, Java 1.5+, and Ant 1.7+. Ensure that the following system properties are set in your shell:
With the environment variables set, run the Ant build script from the installation directory to see a list of supported targets.
The set of examples can be built using the provided Ant script build.xml. From the command line execute the following:
Each set of examples will have a number of applications and cache servers that need to be run. Each individual process required for an example will have a corresponding properties file which will provide the set of configuration parameters required to start. The available configuration parameters are:
- MAIN_CLASS - The main class to execute.
- CACHE_CONFIG_FILE - The cache configuration file to use.
- CLUSTER_PORT - The cluster port to start a coherence server with.
- MAIN_CLASS_ARGS - Quoted set of arguments to pass to the main class.
- LOCAL_STORAGE - True to enable local storage.
- COH_OPTS - Additional Java options that you want to set for Coherence.
Properties files for each example will be provided out of the box. To run an example you specify the relative path to the properties file from the resources directory. To run the command pattern proxy server you would run ant -Dfile=commandpattern/proxy.properties run.
The directory containing a properties file is included in the classpath when running an example. This means that all the configuration files in this directory are available at runtime.
The scripts currently expect you to run them from the root directory of the examples project.