20.4. JGroups for Clustered Modes
20.4.1. Configure JGroups for Clusterd Modes
JBoss Data Grid must have an appropriate JGroups configuration in order to operate in clustered mode.
To configure JGroups programmatically use the following:
GlobalConfiguration gc = new GlobalConfigurationBuilder() .transport() .defaultTransport() // <<< This call is missing... .addProperty("configurationFile","jgroups.xml") .build();
To configure JGroups using XML use the following:
<infinispan> <global> <transport> <properties> <property name="configurationFile" value="jgroups.xml" /> </properties> </transport> </global> ... </infinispan>
In either programmatic or XML configuration methods, JBoss Data Grid searches for
jgroups.xml
in the classpath before searching for an absolute path name if it is not found in the classpath.