Using Coherence with JDeveloper
By Antony Reynolds on Mar 02, 2012
Configuring JDeveloper for use with Coherence
Doing some work with Coherence again and so I needed to create some Java code calling Coherence API and edit some Coherence configuration files in JDeveloper. The easiest way to do this is to register the Coherence jar file and the Coherence Schemas with JDeveloper, once that is done then you can use JDevelopers XML insight features to help you create the XML documents.
Register the Coherence Library
To register the Coherence jar file in JDeveloper go to “Tools->Manage Libraries…”, select “New…” and then use “Add Entry…” to add the following entries:
- Class Path
- Doc Path
COHERENCE_HOME is the location where you unzipped the Coherence product.
This lets us use the Coherence API in our Java code by adding the library to our project.
Register the Schemas
To register the Coherence XML Schemas with JDevelper go to “Tools->Preferences…”, select “XML Schemas” and choose “Add…”.
Browse to the <COHERENCE_HOME>\lib\coherence.jar file and add the following schemas:
Now when you create an XML file for use with Coherence you can choose “XML Document from XML Schema” and choose “Use Registered Schemas” to show you suitable schemas to use for your Coherence config.