Both the Coherence Operational Configuration deployment descriptor and the Coherence Cache Configuration deployment descriptor can assign a Java command line option name to any element defined in the descriptor. Some elements already have these Command Line Setting Overrides defined. You can create your own or change the predefined ones.
This feature is useful when you need to change the settings for a single JVM, or to be able to start different applications with different settings without making them use different descriptors. The most common application is passing a different multicast address and/or port to allow different applications to create separate clusters.
To create a Commmand Line Setting Override, add a system-property attribute, specifying the string you would like to assign as the name for the java command line option to the element you want to create an override to. Then, specify it in the Java command line, prepended with "-D".
Example
For example, to create an override for the IP address of the multi-home server to avoid using the default localhost, and instead specify a specific the IP address of the interface we want Coherence to use (for isntance, 192.168.0.301). We would like to call this override tangosol.coherence.localhost.
First, add a system-property to the cluster-config/unicast-listener/address element:
<address>localhost</address>
which will look as follows with the property we added:
<address system-property="tangosol.coherence.localhost">localhost</address>
Then use it by modifying the Java command line:
to specify our address 192.168.0.301 (instead of the default localhost specified in the configuration) as follows:
The following table details all the preconfigured overrides: