This appendix provides a description of the elements that can be used to configure MBeans.
The MBean configuration elements are defined in the coherence.dtd
XML file, which is packaged in coherence.jar
.
The root element of the POF user type descriptor is mbeans. This is where you may begin configuring your MBean.
The format and nesting of the MBean configuration elements is illustrated in Example K-1.
Used in: mbean
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
<extend-lifecycle>true</extend-lifecycle>
Used in: mbean
The enabled
element specifies either true
if the MBean should be instantiated or false
if the MBean should be ignored.
<enabled>true</enabled>
Used in: mbeans
.
The mbean
element contains a list of elements to be instantiated and registered with the Coherence Management infrastructure.
Table K-2 describes the subelements you can define within the mbeans
element.
Table K-2 Subelements of mbean
Element | Required/Optional | Description |
---|---|---|
Optional |
Specifies the class of the standard MBean to instantiate. |
|
Optional |
Specifies the class of the factory used to instantiate the MBean |
|
Optional |
Specifies the JMX |
|
Optional |
Specifies the accessor method on the |
|
Required |
Specifies the |
|
< |
Required |
Specifies if the MBean should be registered on this instance. |
< |
Optional |
Specifies if the MBean should extend beyond the node connection life cycle. |
Used in: mbean
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.
<mbean-factory>java.lang.management.ManagementFactory</mbean-factory> <mbean-accessor>getMemoryMXBean</mbean-accessor>
Used in: mbean
The mbean-class
element contains the class name of a standard MBean. The MBean class must be in the class path to correctly instantiate.
<mbean-class>com.oracle.custom.mbeans.query</mbean-class>
Used in: mbean
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.
<mbean-factory>java.lang.management.ManagementFactory</mbean-factory> <mbean-accessor>getMemoryMXBean</mbean-accessor>
Used in: mbean
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
)
To prefix the custom mbeans with type=Platform
:
<mbean-name>type=Platform</mbean-name>
Used in: mbean
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.
<mbean-query>java.lang:*</mbean-query>
Will include all the MBeans under the java.lang
domain in the Coherence management infrastructure.
A local MBean Server must be enabled.
Used in: root element
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.
Table K-3 describes the elements you can define within the mbeans
element.
Table K-3 Subelement of mbeans
Element | Required/Optional | Description |
---|---|---|
< |
Required |
Specifies the MBean type, implementation, and |