Coherence management is implemented using Java Management Extensions (JMX). JMX is a Java standard for managing and monitoring Java applications and services. If you are new to JMX, see Introduction to JMX Technology in Java Management Extensions (JMX) Technology Overview.
This chapter includes the following sections:
Conceptual Overview of Oracle Coherence Management
Figure 1-1 shows a conceptual view of cluster members and their managed objects being managed through a remote MBean server located on a single cluster member.
Figure 1-1 Oracle Coherence JMX Management
Description of "Figure 1-1 Oracle Coherence JMX Management"
Oracle Coherence MBeans
Oracle Coherence managed objects are registered to an MBean server using the
com.tangosol.net.management.Registry interface. The interface is specific to managing clustered resources and is an abstraction of the basic JMX registration APIs. Though the interface is closely related to the JMX infrastructure, it is independent from
javax.management.* classes. The interface enables remote management support for cluster members that are not collocated with any JMX services and allows Oracle Coherence MBeans to be registered in an MBean server that is either collocated with or remote to the managed object.
Oracle Coherence MBeans Reference, provides a list of all MBeans and describes each of the attributes and operations that are exposed for the managed resources. Some managed resources have only a single instance for each cluster member. However, some managed resources (such as the
CacheMBean MBean) have multiple MBean instances for each cluster member. In addition, an MBean is registered only if at least one managed resource is operational. For the
CacheMBean MBean, a cache must be started before the MBean is registered.
Custom MBeans can be managed and monitored within the management framework. Custom MBeans are any dynamic or standard MBeans that are specific to an application. The MBeans are registered either declaratively in an XML file or programmatically using the
Registration interface. Registering custom MBeans allows application MBeans to be managed or monitored from any JVM, member, or end-point within the cluster. See Registering Custom MBeans.
Any MBean-capable console can interact with Oracle Coherence MBeans. The Java VisualVM console and the Java Monitoring & Management Console (JConsole) that are distributed with the JDK are common choices. Support is also provided for the JMX HTML Adapter Web Application that is included as part of the JMX reference implementation. See Accessing Oracle Coherence MBeans.
Java VisualVM Coherence Plugin
The Coherence-JVisualVM plug-in aggregates Coherence MBean data and shows a concise operational view of a Coherence cluster within the Java VisualVM console. Management information is presented over time, which allows real-time analysis and troubleshooting. See Using the Coherence-JVisualVM Plug-In.
Management Reporting in Oracle Coherence
Figure 1-2 shows a conceptual view of management reports that are generated on a single cluster member based on the management information of all cluster members.
Figure 1-2 Oracle Coherence Management Reports
Description of "Figure 1-2 Oracle Coherence Management Reports"
Many predefined reports are provided. See Analyzing Report Contents. The predefined reports can be customized or new reports can be created as required. Reporting functionality is disabled by default and must be explicitly enabled. In addition, only a subset of the reports are initially configured to be generated. See Using Oracle Coherence Reporting.
Overview of Management Configuration
The following files are used to configure management:
Operational override file – The
tangosol-coherence-override.xmlfile is used to override the default operational settings that are contained in the operational deployment descriptor (
tangosol-coherence.xml)that is located in the Coherence JAR file. The descriptor specifies the operational and run-time settings for a cluster and includes management services. The management settings are defined within the
<management-config>node. See management-config in Developing Applications with Oracle Coherence.
MBean configuration override File – The
custom-mbeans.xmlfile is the default MBean configuration override file. It declaratively defines custom MBeans. Custom MBeans can also be defined within the operational override file. However, the MBean configuration override file is typically used instead.
Report configuration files – A report configuration file defines a report and results in the creation of a report file that displays management information for a particular set of metrics. Report configuration files must be referenced in a report group configuration file to be used at run time. The default report configuration files are located in the
/reportsdirectory of the
coherence.jarlibrary file and are referenced by the default report group configuration file. Custom report configuration files can be created as required. See Report File Configuration Elements for details about the report file configuration elements.
Report group configuration file – A report group configuration file lists the name and location of report definition files and the output directory where reports are written. The name and location of this file is defined in the operational deployment descriptor. By default, the
report-group.xmlfile is used and is located in the
/reportsdirectory of the
coherence.jarlibrary file. Additional report group configuration files are provided. In addition, custom report group files can be created as required. See Report Group Configuration Elements for details about the report group configuration elements.
Management invocation service file – The
management-config.xmlfile configures the management invocation service instance that is used by the Oracle Coherence JMX management framework. The file is located in the root of the
coherence.jarlibrary file and can be overridden by placing another
management-config.xmlfile in the classpath before the
coherence.jarlibrary file. This configuration file is not defined by an XSD. The file must have a
<config>root element and supports the same subelements that are available for an
<invocation-scheme>element. See invocation-scheme in Developing Applications with Oracle Coherence.
To learn more about Coherence configuration, see Understanding Configuration in Developing Applications with Oracle Coherence.
Managing Oracle Coherence with Oracle WebLogic Server
Oracle WebLogic Server includes an Oracle Coherence integration which standardizes how Oracle Coherence is managed within an Oracle WebLogic Server domain. The integration makes Oracle Coherence a subsystem of Oracle WebLogic Server and allows Oracle Coherence environments to be managed using Oracle WebLogic Server tools.
The key benefits include the ability to:
Setup and configure Oracle Coherence clusters
Add and remove Oracle Coherence cluster members
Configure Oracle Coherence cluster member properties
Start and stop Oracle Coherence cluster members
Deploy Oracle Coherence applications as Grid ARchive (GAR) modules
Start and stop Oracle Coherence applications
Secure Oracle Coherence resources
For details about using Oracle Coherence with WebLogic server, see Deploying Coherence Applications to WebLogic Server in Administering Oracle Coherence.
Creating a Web Application for Coherence Management Over REST
In a large Coherence cluster with many members, you may encounter performance issues when querying Coherence MBeans from the Administration Server REST end point. To avoid such issues, you can directly query the Coherence management over REST API by deploying a web application to a Coherence Managed Server that has an MBean proxy server running.
Here is an example on how to build the web application for Coherence management over REST:
- Create a directory for the web application:
- Go to the web application directory, and then create
- Add the following
WEB-INF. You may rename the <
context-root>, if required. In this example,
cohmgmtis the <
<?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <display-name>Coherence Management REST Resources</display-name> <description>Coherence Management REST Resources</description> <servlet> <servlet-name>coherence.management.rest.Application</servlet-name> <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class> <init-param> <param-name>javax.ws.rs.Application</param-name> <param-value>com.tangosol.coherence.management.internal.ManagementResourceConfig</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>coherence.management.rest.Application</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> </web-app>
<?xml version="1.0" encoding="UTF-8"?> <weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app"> <context-root>cohmgmt</context-root> </weblogic-web-app>
- Build the web application
.warfile. Go to the parent directory of the web application and use the following command to create the
jar cvf CohManagement.war -C CohManagement .
- Deploy the
.warfile to a managed Coherence server that has an MBean proxy server running.
To query the Coherence MBeans through the web application, use the managed Coherence server's (WebLogic server) listening port.
Managing Oracle Coherence with Fusion Middleware Control
Managing Oracle Coherence with Oracle Enterprise Manager
Oracle Enterprise Manager Cloud Control includes the Management Pack for Oracle Coherence, which is used to manage and monitor Oracle Coherence clusters. The management pack helps administrators actively monitor the performance of their clusters and reduces the time needed to identify and diagnose performance problems within their application environments.
The key benefits include the ability to:
Manage complexity by modeling the entire cluster as a single target
Provide real-time and historical performance monitoring for caches and nodes for faster diagnostics and resolution times
Monitor caches in the context of applications to analyze dependency
Provide proactive monitoring using thresholds and alerts
Reduce risk using automated provisioning and lifecycle management
Change run-time configuration to quickly tune cache performance
Oracle Enterprise Manager Cloud Control, which includes the Management Pack for Oracle Coherence, can be downloaded at Oracle Enterprise Manager Downloads. See Getting Started with Management Pack for Oracle Coherence in Enterprise Manager Cloud Control Oracle Fusion Middleware Management Guide.