Monday, 29 March 2010

Discover/Monitor a Coherence Cluster from Oracle Enterprise Manager

I have wanted to do this for a while since it was added to OEM. This demo is using Coherence 3.5 with OEM The steps are documented here.
Oracle® Enterprise Manager Getting Started Guide for Oracle Coherence
10g Release 5 (

Part Number E14631-02

Note: This demo is done within ANT , you can easily convert the ANT tasks to a J2SE client without to much issue.

1. Initially we have to start a Management Coherence Node using the Bulk Management MBeans shipped with OEM. Copy the files below to where your coherence node will run from.


2. In your ANT build.xml file define the following classpath which will include coherence.jar and the 2 jar files from OEM obtained at step #1

<path id="j2ee.classpath">
<pathelement path="${oracle.coherence.home}/lib/coherence.jar"/>
<pathelement path="./lib/coherenceEMIntg.jar"/>
<pathelement path="./lib/bulkoperationsmbean_11.1.1.jar"/>

3. Start a Management Coherence Node with a target as follows.

<property name="" value="oracle.sysman.integration.coherence.EMIntegrationServer"/>
<target name="run-jmx" depends="compile" description="Run the JMX enabled cache server">
<echo message="Starting JMX enabled cache server with jvm args : ${jvmargs}"/>
<java classname="${}" fork="true">
<sysproperty key="" value="all"/>
<sysproperty key="" value="true"/>
<sysproperty key="" value="10001"/>
<sysproperty key="" value="false"/>
<sysproperty key="" value="false"/>
<jvmarg line="${jvmargs}"/>
<path refid="j2ee.classpath"/>

4. Start one or more default cache servers using an ANT task as follows.

<property name="" value=""/>
<target name="run-default" depends="compile" description="Run the cache server">
<echo message="Starting cache server with jvm args : ${jvmargs}"/>
<java classname="${}" fork="true">
<jvmarg line="${jvmargs}"/>
<path refid="j2ee.classpath"/>

5. In OEM setup a target to the Management Coherence Node using connect details as follows

Note: It's assumed the Management Coherence Node is running on host "" and the port we used is 10001. Also all other fields are left blank.

Machine Name:
JMX Remote Port: 10001
Service URL: service:jmx:rmi:///jndi/rmi://
Communication Protocol: rmi
Service Name: jmxrmi
Bulk Operations MBean: Coherence:type=BulkOperations

Note: I deliberately have set to disable authentication here.

Thats it now you can monitor the cache's from OEM and get other JMX stats available through OEM. I believe the OEM agent will communicate directly with Management Coherence Node here.

Finally the for ANT is defined as follows. These are used in the ANT targets and references above.

# oracle.coherence.home

# jvmargs
# JVM args to pass into the command at runtime to set heap size etc

jvmargs=-server -showversion -Xms512m -Xmx512m

1 comment:

WhatisCooking said...

If you need a Coherence Monitoring Solituon, please check out