The output is especially helpful when developing and testing Coherence applications and solutions
The output for a Coherence node indicates the location and name of the report group configuration file and the MBean configuration file that are loaded at startup.
The MBean configuration message is emitted with the other operational override messages and is among the first messages to be emitted when starting a process. The output is especially helpful when using override files and is often useful when developing and testing Coherence applications and solutions.
3.6 Disabling Schema Validation
Coherence uses schema validation to ensure that configuration files adhere to their respective schema definition. Configuration files that include a schema reference are automatically validated against the schema when the configuration file is loaded. A validation error causes an immediate failure and an error message is emitted that indicates which element caused the error. Schema validation should always be used as a best practice.
Schema validation can be disabled if required. To disable schema validation, remove the xsi:schemaLocation attribute from a configuration file. The following example creates a tangosol-coherence-override.xml file that does not contain a schema reference and is not validated when loaded:
When schema validation is disabled, Coherence only fails if the XML is malformed. Syntactical errors are ignored and may not be immediately apparent.
3.7 Understanding the XML Override Feature
The XML override feature is a configuration mechanism that allows any operational settings to be changed without having to edit the default tangosol-coherence.xml operational deployment descriptor that is located in the coherence.jar . This mechanism is the preferred way of configuring the Coherence operational run time.
The XML override feature works by associating an XML document, commonly referred to as an override file, with a specific operational XML element. The XML element, and any of its subelements, are then modified as required in the override file. At run time, Coherence loads the override file and its elements replace (or are added to) the elements that are in the tangosol-coherence.xml file.
An override file does not have to exist at run time. However, if the override file does exist, then its root element must match the element it overrides. In addition, subelements are optional. If a subelement is not defined in the override file, it is loaded from the tangosol-coherence.xml file. Typically, only the subelements that are being changed or added are placed in the override file.
3.7.1 Using the Predefined Override Files
Multiple override files are predefined and can override elements in the operational deployment descriptor. These files must be manually created and saved to a location in the classpath.
tangosol-coherence-override.xml – This override file is defined for the root element and is used to override any element in the operational deployment descriptor. The root element in this file must be the element.
custom-mbeans.xml – This override file is defined for the element and is used to add custom MBeans to the operational deployment descriptor. The root element in this file must be the element.
cache-factory-config.xml – This override file is defined for the element and is used
cache-factory-builder-config.xml – This override file is defined for the element and is used to customize a cache factory builder. This override file is typically only used to support container integrations. The element is not commonly overridden.
The following example demonstrates a tangosol-coherence-override.xml file that is used to override the default cluster name. All other operational settings are loaded from the tangosol-coherence.xml file.
The following example demonstrates a tangosol-coherence-override.xml file that is used to disable local storage for the distributed cache service on this node. Notice the use of an id attribute to differentiate an element that can have multiple occurrences. The id attribute must match the id attribute of the element being overridden.