Search in sources :

Example 1 with ClusterSessionListener

use of org.apache.catalina.ha.session.ClusterSessionListener in project tomcat by apache.

the class SimpleTcpCluster method checkDefaults.

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);
}
Also used : JvmRouteBinderValve(org.apache.catalina.ha.session.JvmRouteBinderValve) MessageDispatchInterceptor(org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor) GroupChannel(org.apache.catalina.tribes.group.GroupChannel) TcpFailureDetector(org.apache.catalina.tribes.group.interceptors.TcpFailureDetector) DeltaManager(org.apache.catalina.ha.session.DeltaManager) ClusterSessionListener(org.apache.catalina.ha.session.ClusterSessionListener)

Aggregations

ClusterSessionListener (org.apache.catalina.ha.session.ClusterSessionListener)1 DeltaManager (org.apache.catalina.ha.session.DeltaManager)1 JvmRouteBinderValve (org.apache.catalina.ha.session.JvmRouteBinderValve)1 GroupChannel (org.apache.catalina.tribes.group.GroupChannel)1 MessageDispatchInterceptor (org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor)1 TcpFailureDetector (org.apache.catalina.tribes.group.interceptors.TcpFailureDetector)1