3.5.1 Specifying a Custom Report Group Configuration File

3.5.1 Specifying a Custom Report Group Configuration File

The name and location of the default report group configuration file is specified in the operational configuration deployment descriptor within the node. A custom report group configuration file can be specified by either using an operational override file or a system property.

The report group configuration file is only loaded if JMX management is enabled. The examples in this section demonstrate enabling JMX management on nodes that host an MBean server.

3.5.1.1 Overriding the Default Report Group Configuration File

The name and location of a custom report group configuration file can be specified using an operational override file. This mechanism overrides the default name and location of the report group configuration file.

Edit the file and enter a node that specifies the name of the report group configuration file. If the report group configuration file is not located in the classpath, enter the full (or relative) path to the file as well. The element also supports the use of a URL when specifying the location of a report group configuration file.

The following example demonstrates starting a cache server using an operational override file and a report group configuration file that are located in COHERENCE_HOME .

3.5.1.2 Using the Report Group Configuration File System Property

The tangosol.coherence.management.report.configuration system property is used to specify a custom report group configuration file to be used instead of the default report-group.xml file. The system property provides an easy way to switch between different configurations and is convenient during development and testing.

To specify a custom report group configuration file, enter the name of the file as a value of the tangosol.coherence.management.report.configuration system property. This is typically done as a -D Java option when starting a Coherence node. If the file is not located in the classpath, enter the full (or relative) path to the file and the name. The system property also supports the use of a URL when specifying the location of a report group configuration file.

The following example starts a cache server, enables JMX management, and specifies a report group configuration file that is named my-group.xml and is located in COHERENCE_HOME .

3.5.2 Specifying an MBean Configuration File

The tangosol-coherence.xml operational deployment descriptor defines an operational override file that is named custom-mbeans.xml and is specifically used to define custom MBeans. A name and location of the override file may also be specified using the MBean configuration file system property.

3.5.2.1 Using the Default MBean Configuration Override File

Custom MBeans are defined within an override file named custom-mbeans.xml . At run time, Coherence directorio uses the first instance of custom-mbeans.xml that is found in the classpath.

The following example demonstrates starting a cache server that uses a default MBean configuration override file that is located in COHERENCE_HOME .

3.5.2.2 Using the MBean Configuration File System Property

The tangosol.coherence.mbeans system property specifies an MBean configuration override file to be used instead of the default custom-mbeans.xml override file. The system property provides an easy way to switch between different MBean configurations and is convenient during development and testing.

To specify an MBean configuration override file, enter the name of the file as a value of the tangosol.coherence.mbeans system property. This is typically done as a -D Java option when starting a Coherence node. If the file is not located in the classpath, enter the full (or relative) path to the file and the name. The system property also supports the use of a URL when specifying the location of an MBean configuration override file.

The following example starts a cache server and specifies an MBean configuration override file that is named my-mbeans.xml and is located in COHERENCE_HOME .