If we have
<UDP mcast_addr="${myapp.mcast_addr:235.5.5.5}".../>
, then the default mcast_addr is 235.5.5.5.
If we set -Dmyapp.mcast_addr=238.5.5.5 but also set -Djgroups.udp.mcast_addr=239.5.5.5, then the latter system property always overrides the former, so we'll use 239.5.5.5 as mcast_addr.
This is bad, e.g. when we have multiple channels in the same JVM, where one channel uses myapp1.mcast_addr and the other myapp2.mcast_addr. If -Djgroups.udp.mcast_addr is set (e.g. by JBoss EAP), then we'll always use it rather than the different mcast addresses !
This means that - if we use the same mcast_port value - the 2 clusters will see each other's traffic as they use the same mcast_addr.
Investigate whether we still need to use those overrides. Contact Brian Stansberry, IIRC he's the one who suggested this.
SOLUTION:
- If a property is set in the XML, either directly or via property substitution (e.g. myapp.mcast_addr, then use that value
- If the value is not set and a system property (e.g. jgroups.udp.mcast_addr) has been set, set the value from that system property