+ "</Host>" + LF.LINE_SEPARATOR;
check(aspectedResult);
}
public void testCluster() throws Exception {
SimpleTcpCluster cluster = new SimpleTcpCluster();
cluster.setClusterName("cluster");
cluster.setProperty("expireSessionsOnShutdown","false");
cluster
.setManagerClassName("org.apache.catalina.cluster.session.DeltaManager");
McastService service = new McastService();
service.setMcastAddr("228.0.0.4");
service.setMcastPort(45564);
service.setMcastFrequency(500l);
service.setMcastDropTime(3000l);
cluster.setMembershipService(service);
ReplicationListener receiver = new ReplicationListener();
receiver.setTcpListenAddress("auto");
receiver.setTcpListenPort(4001);
receiver.setTcpSelectorTimeout(100l);
receiver.setTcpThreadCount(6);
cluster.setClusterReceiver(receiver);
ReplicationTransmitter sender = new ReplicationTransmitter();
sender.setReplicationMode("pooled");
cluster.setClusterSender(sender);
ReplicationValve valve = new ReplicationValve();
valve
.setFilter(".*\\.gif;.*\\.js;.*\\.jpg;.*\\.jpeg;.*\\.htm;.*\\.html;.*\\.txt;");
cluster.addValve(valve);
FarmWarDeployer deployer = new FarmWarDeployer();
deployer.setTempDir("/tmp/war-temp/");
deployer.setDeployDir("/tmp/war-deploy/");
deployer.setWatchDir("/tmp/war-listen/");
deployer.setWatchEnabled(false);
cluster.setClusterDeployer(deployer);
standardHost.setCluster(cluster);
cluster.addLifecycleListener(new InfoLifecycleListener());
cluster.addClusterListener(new JvmRouteSessionIDBinderListener());
// DeltaManager is default!
String aspectedResult = "<Host"
+ LF.LINE_SEPARATOR
+ " name=\"localhost\">"
+ LF.LINE_SEPARATOR