Search in sources :

Example 11 with ServerLocatorImpl

use of org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl in project activemq-artemis by apache.

the class ClusterControllerTest method controlWithDifferentConnector.

@Test
public void controlWithDifferentConnector() throws Exception {
    try (ServerLocatorImpl locator = (ServerLocatorImpl) createInVMNonHALocator()) {
        locator.setProtocolManagerFactory(ActiveMQServerSideProtocolManagerFactory.getInstance(locator));
        ClusterController controller = new ClusterController(getServer(0), getServer(0).getScheduledPool());
        ClusterControl clusterControl = controller.connectToNodeInCluster((ClientSessionFactoryInternal) locator.createSessionFactory());
        clusterControl.authorize();
    }
}
Also used : ClusterController(org.apache.activemq.artemis.core.server.cluster.ClusterController) ServerLocatorImpl(org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl) ClusterControl(org.apache.activemq.artemis.core.server.cluster.ClusterControl) Test(org.junit.Test)

Aggregations

ServerLocatorImpl (org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl)11 Test (org.junit.Test)6 ServerLocator (org.apache.activemq.artemis.api.core.client.ServerLocator)3 Field (java.lang.reflect.Field)2 Method (java.lang.reflect.Method)2 HashMap (java.util.HashMap)2 ScheduledThreadPoolExecutor (java.util.concurrent.ScheduledThreadPoolExecutor)2 ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor)2 SimpleString (org.apache.activemq.artemis.api.core.SimpleString)2 TransportConfiguration (org.apache.activemq.artemis.api.core.TransportConfiguration)2 ClusterControl (org.apache.activemq.artemis.core.server.cluster.ClusterControl)2 ClusterController (org.apache.activemq.artemis.core.server.cluster.ClusterController)2 ActiveMQConnectionFactory (org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory)2 URI (java.net.URI)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Connection (javax.jms.Connection)1 MessageEndpoint (javax.resource.spi.endpoint.MessageEndpoint)1 ActiveMQClusterSecurityException (org.apache.activemq.artemis.api.core.ActiveMQClusterSecurityException)1 ClientSession (org.apache.activemq.artemis.api.core.client.ClientSession)1