Shared Coherence Cluster Configuration
Shared Coherence Cluster Configuration
In the above approach, coherence cache configuration file can be shared among the participating cluster nodes, rather than duplicating the configuration for each participating node. This approach allows JVMs to override the configuration at server startup using system-property attribute of the coherence configuration XML.
Example
<coherence xml-override="/tangosol-coherence-override.xml">
<cluster-config>
<member-identity>
<cluster-name system-property="cluster.name">CYCLE_CLUSTER</cluster-name>
<member-name system-property="cluster.member">CYCLE_AGENT</member-name>
</member-identity>
<unicast-listener>
<address system-property="node.name">wls-1</address>
<port system-property="node.port">5555</port>
<port-auto-adjust>false</port-auto-adjust>
<well-known-addresses>
<socket-address id="1"> <!— For Cycle Agent-1 on WLS-1 —>
<address>wls-1</address>
<port>5555</port>
</socket-address>
<socket-address id="2"> <!— For Cycle Agent-2 on WLS-1 —>
<address>wls-1</address>
<port>5560</port>
</socket-address>
<socket-address id="3"> <!— For Cycle Agent-3 on WLS-2 —>
<address>wls-2</address>
<port>5557</port>
</socket-address>
<socket-address id="4"> <!— For Cycle Agent-4 on WLS-2 —>
<address>wls-2</address>
<port>5558</port>
</socket-address>
<socket-address id="5"> <!— For Cycle Client —>
<address>wls-1</address>
<port>5559</port>
</socket-address>
</well-known-addresses>
</unicast-listener>
</cluster-config>
Cycle Agent 1 JVM Args:
-Dcluster.member=CYCLE_AGENT_1 -Dnode.name=WLS-1 -Dnode.port=5555
Cycle Agent 2 JVM Args:
-Dcluster.member=CYCLE_AGENT_2 -Dnode.name=WLS-1 -Dnode.port=5556
Cycle Agent 3 JVM Args:
-Dcluster.member=CYCLE_AGENT_3 -Dnode.name=WLS-2 -Dnode.port=5557
Cycle Agent 4 JVM Args:
-Dcluster.member=CYCLE_AGENT_4 -Dnode.name=WLS-2 -Dnode.port=5558
Cycle Client JVM Args:
-Dcluster.member=CYCLE_CLIENT -Dnode.name=WLS-1 -Dnode.port=5559