This document explains how to import and use the pof-plugin-example-project which contains
example Coherence code which utilizes the Coherence POF Plugin.
Use the following to download the Coherence jar:
mvn -DgroupId=com.oracle.coherence.ce -DartifactId=coherence -Dversion=20.12 dependency:getNote: Ensure you have installed the
Coherence POF Pluginas described here into your Eclipse IDE.
-
Choose
File->Open Projects from Filesystem -
Choose
Directoryand select thepof-plugin-example-project, then clickDone
-
Right-click on the
pof-plugin-example-projectproject and chooseBuild Path -> Configure Build Path -
Click
Add Libraryand ChooseUser Library -
Click on
User LibrarythenNew -
Name the library
coherenceand and click onAdd External Jars -
Select
coherence-20.12.jarfrom~/.m2/repository/com/oracle/coherence/ce/coherence/20.12/ -
Click on
Apply and Close,FinishthenApply and closeagain
-
Right-Click on the project to select configure and enable the POF plugin
-
Select
Project->Build All -
You should see messages in
Problemstab showing the classes are instrumented.
- Run the class RunExample.java
The output should be similar to the following, indicating that the classes were successful annotated
Oracle Coherence Version 20.12 Build 83712
Community Edition: Development mode
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Person cache size is 1
Person [id=1, name=John, address=Address [addressLine1=Address 1, addressLine2=Address 2, city=Perth, state=WA, postCode=3674, country=AU]]
Person classes are equal? true
Person is PortableObject? true
Address is PortableObject? true
Name is Tim Jones
Employee is Employee [empId=123456, employer=Oracle, id=2, name=Tim Jones, address=Address [addressLine1=Address 1, addressLine2=Address 2, city=Perth, state=WA, postCode=2964, country=AU]]
