4.2.3. Buddy Replication

Again, as we discussed with HTTP session replication, buddy replication is available for stateful session beans as well. The configuration file for buddy replication is jboss-cache-manager-jboss-beans.xml, in the directory JBOSS_EAP_DIST/jboss-as/server/PROFILE/deploy/cluster/jboss-cache-manager.sar/META-INF. Note that the default, standard and minimal configurations do not have the clustering configuration, nor the clustering code deployed. To configure buddy replication for stateful session beans, change the buddyReplicationConfig's property to true, as in the following extract.
<!-- Standard cache used for EJB3 SFSB caching -->
<entry><key>sfsb-cache</key>
  <value>
    <bean name="StandardSFSBCacheConfig" class="org.jboss.cache.config.Configuration">
    ...
      <property name="buddyReplicationConfig">
        <bean class="org.jboss.cache.config.BuddyReplicationConfig">
          <!--  Just set to true to turn on buddy replication -->
          <property name="enabled">true</property>