* that prevents this component from being used
*/
public void start()
throws LifecycleException {
if (started)
throw new LifecycleException
(sm.getString("cluster.alreadyStarted"));
log.info("Cluster is about to start");
try {
IntrospectionUtils.callMethodN(getContainer(), "addValve", new Object[] {valve}, new Class[] {valve.getClass()});
clusterReceiver.setIsSenderSynchronized(clusterSender.getIsSenderSynchronized());
clusterReceiver.setCatalinaCluster(this);
clusterReceiver.start();
clusterSender.start();
membershipService.setLocalMemberProperties(clusterReceiver.getHost(),clusterReceiver.getPort());
membershipService.addMembershipListener(this);
membershipService.start();
//set the deployer.
try {
if ( clusterDeployer != null ) {
clusterDeployer.setCluster(this);
Object deployer = IntrospectionUtils.getProperty(getContainer(), "deployer");
// FIXME: clusterDeployer.setDeployer( (org.apache.catalina.Deployer) deployer);
clusterDeployer.start();
}
} catch (Throwable x) {
log.fatal("Unable to retrieve the container deployer. Cluster deployment disabled.",x);
} //catch
this.started = true;
} catch ( Exception x ) {
log.error("Unable to start cluster.",x);
throw new LifecycleException(x);
}
}