Search in sources :

Example 1 with BackupManager

use of org.apache.catalina.ha.session.BackupManager in project cas by apereo.

the class CasTomcatEmbeddedServletContainerFactory method getClusteringManagerInstance.

private ClusterManagerBase getClusteringManagerInstance() {
    switch(clusteringProperties.getManagerType().toUpperCase()) {
        case "DELTA":
            final DeltaManager manager = new DeltaManager();
            manager.setExpireSessionsOnShutdown(clusteringProperties.isExpireSessionsOnShutdown());
            manager.setNotifyListenersOnReplication(true);
            return manager;
        default:
            final BackupManager backupManager = new BackupManager();
            backupManager.setNotifyListenersOnReplication(true);
            return backupManager;
    }
}
Also used : DeltaManager(org.apache.catalina.ha.session.DeltaManager) BackupManager(org.apache.catalina.ha.session.BackupManager)

Example 2 with BackupManager

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

the class TestChannelConfig method testStringInputForMapSendOptions.

@Test
public void testStringInputForMapSendOptions() {
    BackupManager manager = new BackupManager();
    manager.setMapSendOptions("async, multicast");
    Assert.assertEquals(Channel.SEND_OPTIONS_ASYNCHRONOUS | Channel.SEND_OPTIONS_MULTICAST, manager.getMapSendOptions());
}
Also used : BackupManager(org.apache.catalina.ha.session.BackupManager) Test(org.junit.Test)

Example 3 with BackupManager

use of org.apache.catalina.ha.session.BackupManager in project cas by apereo.

the class CasTomcatServletWebServerFactory method getClusteringManagerInstance.

private ClusterManagerBase getClusteringManagerInstance() {
    val clusteringProperties = casProperties.getServer().getTomcat().getClustering();
    val type = clusteringProperties.getManagerType().toUpperCase();
    if ("DELTA".equalsIgnoreCase(type)) {
        val manager = new DeltaManager();
        manager.setExpireSessionsOnShutdown(clusteringProperties.isExpireSessionsOnShutdown());
        manager.setNotifyListenersOnReplication(true);
        return manager;
    }
    val backupManager = new BackupManager();
    backupManager.setNotifyListenersOnReplication(true);
    return backupManager;
}
Also used : lombok.val(lombok.val) DeltaManager(org.apache.catalina.ha.session.DeltaManager) BackupManager(org.apache.catalina.ha.session.BackupManager)

Aggregations

BackupManager (org.apache.catalina.ha.session.BackupManager)3 DeltaManager (org.apache.catalina.ha.session.DeltaManager)2 lombok.val (lombok.val)1 Test (org.junit.Test)1