private Property prepareTomcatClustering(Host host, Property engineConfig) throws ContainerException { Property clusterProp = null; List<Property> clusterProps = engineConfig.getPropertiesWithValue("cluster"); if (clusterProps.size() > 1) { throw new ContainerException("Only one cluster configuration allowed per engine"); } if (UtilValidate.isNotEmpty(clusterProps)) { clusterProp = clusterProps.get(0); GroupChannel channel = new GroupChannel(); channel.setChannelReceiver(prepareChannelReceiver(clusterProp)); channel.setChannelSender(prepareChannelSender(clusterProp)); channel.setMembershipService(prepareChannelMcastService(clusterProp)); SimpleTcpCluster cluster = new SimpleTcpCluster(); cluster.setClusterName(clusterProp.name); cluster.setManagerTemplate(prepareClusterManager(clusterProp)); cluster.setChannel(channel); cluster.addValve(prepareClusterValve(clusterProp)); host.setCluster(cluster); Debug.logInfo("Catalina Cluster [" + cluster.getClusterName() + "] configured for host - " + host.getName(), module); } return clusterProp; }