Exploring new Coherence 12.2.1 Features Through the OOTB Examples

With the release of Coherence 12.2.1 we have included many examples so you can get hands-on experience existing features as well as getting up to speed with new features such as support for Java8, Cache Persistence, Federation and Async processing API.

Download Coherence & Java 8

  1. Ensure you have downloaded and installed the latest Java8 SE Developers kit available from OTN
  2. Download the Coherence Standalone Install from OTN
  3. Unzip the downloaded file fmw_12.2.1.0.0_coherence_Disk1_1of1.zip which will give you a jar called fmw_12.2.1.0.0_coherence.jar

Install Coherence

To install Coherence, follow the instructions in Section 2.2 of Installation Documentation. A shortened version of this is below. (Refer to the above link if you have any issues)

  1. Open up a command prompt or terminal and set JAVA_HOME environment variable to your installed Java 8 JDK. E.g. for Windows:
    SET JAVA_HOME=c:\jdk\jdk1.8.0_65
    
  2. Run java command with -jar option pointing to your downloaded fmw_12.2.1.0.0_coherence.jar. E.g.
    %JAVA_HOME%\bin\java -jar c:\downloads\fmw_12.2.1.0.0_coherence.jar
    
  3. Click Next and Choose Auto-Updates option.
  4. Choose an installation location, e.g. c:\Oracle\Middleware\1221 and click Next.
  5. Ensure you select ‘Coherence with Examples’ option then carry on to complete the installation.

Navigate To the Examples Directory

Once the installation has completed you will find a coherence\examples directory under the installation directory you chose above. E.g. if you installation directory was c:\Oracle\Middleware\1221 then the examples directory will be c:\Oracle\Middleware\1221\coherence\examples.

Within this directory you will find the following directories java, cpp, dotnet and rest. In each of these directories refer to the readme.txt which includes explanations on how to run each example.  You can also refer to the online documentation as well.

I’ve included some highlights of the directories and the examples we ship within them:

  • rest – This directory contains a modern web application using using AngularJS and Bootstrap to showcase how to access Coherence via REST. This is the only example currently that uses maven to build and run.
  • java – Includes various Java examples including:
    • Java 8 support including Lambdas, Streams, Map Default methods
    • New NamedCache Async API
    • Federation
    • Cache Persistence
    • Events
    • Security

For more details on the above new features, see my Coherence 12.2.1 Overview post.

Keep your eyes out for a post on how to run the Coherence and WebLogic Server examples.

Enjoy!

Advertisements
This entry was posted in Examples and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s