protected void checkDefaults() { if ( clusterListeners.size() == 0 ) { addClusterListener(new ClusterSessionListener()); } if ( valves.size() == 0 ) { addValve(new JvmRouteBinderValve()); addValve(new ReplicationValve()); } if ( clusterDeployer != null ) clusterDeployer.setCluster(this); if ( channel == null ) channel = new GroupChannel(); if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) { channel.addInterceptor(new MessageDispatch15Interceptor()); channel.addInterceptor(new TcpFailureDetector()); } }
protected void checkDefaults() { if ( clusterListeners.size() == 0 && managerTemplate instanceof DeltaManager ) { addClusterListener(new ClusterSessionListener()); } if ( valves.size() == 0 ) { addValve(new JvmRouteBinderValve()); addValve(new ReplicationValve()); } if ( clusterDeployer != null ) clusterDeployer.setCluster(this); if ( channel == null ) channel = new GroupChannel(); if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) { channel.addInterceptor(new MessageDispatchInterceptor()); channel.addInterceptor(new TcpFailureDetector()); } if (heartbeatBackgroundEnabled) channel.setHeartbeat(false); }
protected void checkDefaults() { if ( clusterListeners.size() == 0 ) { addClusterListener(new JvmRouteSessionIDBinderListener()); addClusterListener(new ClusterSessionListener()); } if ( valves.size() == 0 ) { addValve(new JvmRouteBinderValve()); addValve(new ReplicationValve()); } if ( clusterDeployer != null ) clusterDeployer.setCluster(this); if ( channel == null ) channel = new GroupChannel(); if ( channel instanceof GroupChannel && !((GroupChannel)channel).getInterceptors().hasNext()) { channel.addInterceptor(new MessageDispatch15Interceptor()); channel.addInterceptor(new TcpFailureDetector()); } }
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; }