Skip Headers
Oracle® Coherence Developer's Guide
Release 3.5

Part Number E14509-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

K MBean Configuration Elements

This appendix provides a description of the elements that can be used to configure MBeans.

MBeans in the Coherence Deployment Descriptor

The MBean configuration elements are defined in the coherence.dtd XML file, which is packaged in coherence.jar.

Document Root

The root element of the POF user type descriptor is mbeans. This is where you may begin configuring your MBean.

Document Format

The format and nesting of the MBean configuration elements is illustrated in Example K-1.

Example K-1 Format and Nesting of MBean Configuration Elements

<mbeans>
  <mbean>
    <mbean-class>
    <mbean-factory>
    <mbean-query>
    <mbean-accessor>
    <mbean-name>
    <enabled>
    <extend-lifecycle>
  </mbean>
</mbeans>

MBean Configuration Element Index

Table K-1 MBean Configuration Element Index

Element Used In:

extend-lifecycle

mbean

enabled

mbean

mbean

mbeans

mbean-accessor

mbean

mbean-class

mbean

mbean-factory

mbean

mbean-name

mbean

mbean-query

mbean

mbeans

root element



extend-lifecycle

Used in: mbean

Description

Specifies if the MBean should extend beyond the node connection life cycle. If false, the MBean will be destroyed and re-created when a node is disconnected from the grid. If true, the MBean will maintain the statistics and values across connections

Example

<extend-lifecycle>true</extend-lifecycle>

enabled

Used in: mbean

Description

The enabled element specifies either true if the MBean should be instantiated or false if the MBean should be ignored.

Example

<enabled>true</enabled>

mbean

Used in: mbeans.

Description

The mbean element contains a list of elements to be instantiated and registered with the Coherence Management infrastructure.

Elements

Table K-2 describes the subelements you can define within the mbeans element.

Table K-2 Subelements of mbean

Element Required/Optional Description

<mbean-class>

Optional

Specifies the class of the standard MBean to instantiate.

<mbean-factory>

Optional

Specifies the class of the factory used to instantiate the MBean

<mbean-query>

Optional

Specifies the JMX ObjectName query pattern used to retrieve the MBeans

<mbean-accessor>

Optional

Specifies the accessor method on the <mbean-factory> used to instantiate the MBean.

<mbean-name>

Required

Specifies the ObjectName prefix for the MBean.

<local-only>

Optional

Controls the MBean visibility across the cluster. If set to true, the MBean is registered only with a local MBeanServer and is not accessible by other cluster nodes; otherwise the nodeId=... key attribute is added to its name and the MBean will be visible from any of the "managing" nodes (the ones that have the managed-nodes element set to values of all or remote-only).

Default value is false.

<enabled>

Optional

Specifies if the MBean should be registered on this instance.

Default value is false.

<extend-lifecycle>

Optional

Specifies if the MBean should extend beyond the node connection life cycle. If false, the MBean will be destroyed and re-created when a node is disconnected from the grid. If true, the MBean will maintain the statistics and values across connections.



mbean-accessor

Used in: mbean

Description

The mbean-accessor element contains the accessor method name on the MBean Factory that instantiates the MXBean. The MBean factory class must be in the class path to correctly instantiate. The <mbean-accessor> element requires an mbean-factory element.

Example

<mbean-factory>java.lang.management.ManagementFactory</mbean-factory>
<mbean-accessor>getMemoryMXBean</mbean-accessor>

mbean-class

Used in: mbean

Description

The mbean-class element contains the class name of a standard MBean. The MBean class must be in the class path to correctly instantiate.

Example

<mbean-class>com.oracle.custom.mbeans.query</mbean-class>

mbean-factory

Used in: mbean

Description

The mbean-factory element contains the class name of a MBean factory that instantiates MXBeans. The MBean factory class must be in the class path to correctly instantiate. The <mbean-factory> element requires an mbean-accessor element.

Example

<mbean-factory>java.lang.management.ManagementFactory</mbean-factory>
<mbean-accessor>getMemoryMXBean</mbean-accessor>

mbean-name

Used in: mbean

Description

The mbean-name element contains the ObjectName prefix for the resulting MBeans. This ObjectName prefix should be a comma-separated Key=Value pair. The Coherence MBean naming convention stipulates that the name should begin with a "type"/"value" pair (that is, type=Platform)

Example

To prefix the custom mbeans with type=Platform:

<mbean-name>type=Platform</mbean-name>

mbean-query

Used in: mbean

Description

The mbean-query element contains a JMX ObjectName query pattern. The query pattern is executed against a local MBean Server and the resulting objects are registered with the Coherence Management infrastructure. This allows the for a single point of consolidation of MBeans for the grid.

Example

<mbean-query>java.lang:*</mbean-query>

Will include all the MBeans under the java.lang domain in the Coherence management infrastructure.

Notes


mbeans

Used in: management-config

Description

The mbeans element is the root element of the custom mbean configuration file. It contains a list of mbean elements to be instantiated and registered with the coherence management infrastructure.

Elements

Table K-3 describes the elements you can define within the mbeans element.

Table K-3 Subelement of mbeans

Element Required/Optional Description

<mbean>

Required

Specifies the MBean type, implementation, and ObjectName that will be instantiated and registered with the Coherence Management service.