Search in sources :

Example 1 with SharedStoreLiveActivation

use of org.apache.activemq.artemis.core.server.impl.SharedStoreLiveActivation in project activemq-artemis by apache.

the class HAPolicyConfigurationTest method SharedStoreMasterTest.

@Test
public void SharedStoreMasterTest() throws Exception {
    Configuration configuration = createConfiguration("shared-store-master-hapolicy-config.xml");
    ActiveMQServerImpl server = new ActiveMQServerImpl(configuration);
    try {
        server.start();
        Activation activation = server.getActivation();
        assertTrue(activation instanceof SharedStoreLiveActivation);
        HAPolicy haPolicy = server.getHAPolicy();
        assertTrue(haPolicy instanceof SharedStoreMasterPolicy);
        SharedStoreMasterPolicy masterPolicy = (SharedStoreMasterPolicy) haPolicy;
        assertFalse(masterPolicy.isFailoverOnServerShutdown());
    } finally {
        server.stop();
    }
}
Also used : Configuration(org.apache.activemq.artemis.core.config.Configuration) StoreConfiguration(org.apache.activemq.artemis.core.config.StoreConfiguration) HAPolicyConfiguration(org.apache.activemq.artemis.core.config.HAPolicyConfiguration) HAPolicy(org.apache.activemq.artemis.core.server.cluster.ha.HAPolicy) SharedStoreLiveActivation(org.apache.activemq.artemis.core.server.impl.SharedStoreLiveActivation) SharedNothingBackupActivation(org.apache.activemq.artemis.core.server.impl.SharedNothingBackupActivation) ColocatedActivation(org.apache.activemq.artemis.core.server.impl.ColocatedActivation) Activation(org.apache.activemq.artemis.core.server.impl.Activation) SharedNothingLiveActivation(org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation) SharedStoreLiveActivation(org.apache.activemq.artemis.core.server.impl.SharedStoreLiveActivation) SharedStoreBackupActivation(org.apache.activemq.artemis.core.server.impl.SharedStoreBackupActivation) LiveOnlyActivation(org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation) ActiveMQServerImpl(org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl) SharedStoreMasterPolicy(org.apache.activemq.artemis.core.server.cluster.ha.SharedStoreMasterPolicy) Test(org.junit.Test)

Aggregations

Configuration (org.apache.activemq.artemis.core.config.Configuration)1 HAPolicyConfiguration (org.apache.activemq.artemis.core.config.HAPolicyConfiguration)1 StoreConfiguration (org.apache.activemq.artemis.core.config.StoreConfiguration)1 HAPolicy (org.apache.activemq.artemis.core.server.cluster.ha.HAPolicy)1 SharedStoreMasterPolicy (org.apache.activemq.artemis.core.server.cluster.ha.SharedStoreMasterPolicy)1 Activation (org.apache.activemq.artemis.core.server.impl.Activation)1 ActiveMQServerImpl (org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl)1 ColocatedActivation (org.apache.activemq.artemis.core.server.impl.ColocatedActivation)1 LiveOnlyActivation (org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation)1 SharedNothingBackupActivation (org.apache.activemq.artemis.core.server.impl.SharedNothingBackupActivation)1 SharedNothingLiveActivation (org.apache.activemq.artemis.core.server.impl.SharedNothingLiveActivation)1 SharedStoreBackupActivation (org.apache.activemq.artemis.core.server.impl.SharedStoreBackupActivation)1 SharedStoreLiveActivation (org.apache.activemq.artemis.core.server.impl.SharedStoreLiveActivation)1 Test (org.junit.Test)1