As explained in Overriding and Extending the Operational Deployment Descriptor, in order to define additional elements or add system properties for existing elements, you use an override file.
The reason for using multiple tiers is to enable all (or many) nodes to use the first tier overrides, while providing additional second tier overrides to selected nodes. For example, you may want to enable verbose logging on only one or two nodes for diagnostic purposes. To do so you would provide those settings in a second tier override file that you then reference in the selected nodes’ engine property files.
The operational descriptor file, tangosol-coherence.xml (located in
BE_HOME/lib/ext/coherence.jar) contains an
xml-override property configured to point to a default override file:
where property is the name of the override property, and
default-property-value is the filepath and name of the file.
The default location of the file specified by tangosol.coherence.override is a file at the root level of the class path. TIBCO BusinessEvents uses the first instance of this file that it finds at the root level of the classpath. For example, if you put an instance of this file at the root level of a different JAR file that is located closer to the beginning of the classpath, then that file is used instead of the one in
coherence.jar.
You can use a user-defined property such as {mode} to define name patterns that provide flexibility. You can place multiple files that use the name pattern in the specified override location. For example, each of the following has a different value for
{mode}:
tangosol-coherence-override-dev.xml,
tangosol-coherence-override-test.xml, and
tangosol-coherence-override-prod.xml files. Then you can easily switch between files that have values appropriate for those environments at engine start-up.
For example, using {mode} as the user defined property, to specify the value in the TRA file, use:
The default value for {mode} is prod (defined in the
tangosol-coherence.xml descriptor). Therefore the default value for the first tier override file is
/tangosol-coherence-override-prod.xml.
To override the default location of the first tier override file, you provide a value for the
tangosol.coherence.override property either at the command line or using an engine property. You can do this one time only, on engine startup. The value and file contents must be the same on all nodes in a cluster.
To specify the override using an engine property, add the property name (specified in the
xml-override property) and its value to the TRA files. All nodes in a cache cluster must specify the same file. For example:
You would configure the property using different values, but the mechanism is the same. For example, you might use the property name
be.coherence.override. You can also use another user property for part of the filename, if you want to provide that flexibility, for example:
As explained above, if you want to specify a file of this pattern, for example, be-coherence-override-dev, you could specify the value in the TRA files or at the command line on engine start-up. Here is an example showing how the system property value is defined at the command line:
Similarly, if you want to specify a different location and filename for the second-tier override file, you would use the
be.coherence.override property, for example: