use of org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl in project activemq-artemis by apache.
the class ActiveMQRAClusteredTestBase method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
primaryConnector = new TransportConfiguration(INVM_CONNECTOR_FACTORY);
HashMap<String, Object> params = new HashMap<>();
params.put(TransportConstants.SERVER_ID_PROP_NAME, "1");
secondaryConnector = new TransportConfiguration(INVM_CONNECTOR_FACTORY, params);
secondaryServer = addServer(ActiveMQServers.newActiveMQServer(createSecondaryDefaultConfig(true), mbeanServer, usePersistence()));
addServer(secondaryServer);
secondaryJmsServer = new JMSServerManagerImpl(secondaryServer);
secondaryJmsServer.start();
waitForTopology(secondaryServer, 2);
}
use of org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl in project activemq-artemis by apache.
the class FileBrokerTest method startWithoutJMS.
@Test
public void startWithoutJMS() throws Exception {
ServerDTO serverDTO = new ServerDTO();
serverDTO.configuration = "broker-nojms.xml";
FileBroker broker = null;
try {
broker = new FileBroker(serverDTO, new ActiveMQJAASSecurityManager());
broker.start();
JMSServerManagerImpl jmsServerManager = (JMSServerManagerImpl) broker.getComponents().get("jms");
Assert.assertNull(jmsServerManager);
ActiveMQServerImpl activeMQServer = (ActiveMQServerImpl) broker.getComponents().get("core");
Assert.assertNotNull(activeMQServer);
Assert.assertTrue(activeMQServer.isStarted());
Assert.assertTrue(broker.isStarted());
} finally {
assert broker != null;
broker.stop();
}
}
use of org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl in project activemq-artemis by apache.
the class JMSTestBase method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
mbeanServer = MBeanServerFactory.createMBeanServer();
Configuration config = createDefaultConfig(true).setSecurityEnabled(useSecurity()).addConnectorConfiguration("invm", new TransportConfiguration(INVM_CONNECTOR_FACTORY)).setTransactionTimeoutScanPeriod(100);
config.getConnectorConfigurations().put("netty", new TransportConfiguration(NETTY_CONNECTOR_FACTORY));
server = addServer(ActiveMQServers.newActiveMQServer(config, mbeanServer, usePersistence()));
jmsServer = new JMSServerManagerImpl(server);
namingContext = new InVMNamingContext();
jmsServer.setRegistry(new JndiBindingRegistry(namingContext));
jmsServer.start();
registerConnectionFactory();
}
use of org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl in project activemq-artemis by apache.
the class JMSClusteredTestBase method setupServer1.
/**
* @throws Exception
*/
private void setupServer1() throws Exception {
Configuration configuration = createConfigServer(1, 2);
JMSConfigurationImpl jmsconfig = new JMSConfigurationImpl();
mBeanServer1 = MBeanServerFactory.createMBeanServer();
server1 = addServer(ActiveMQServers.newActiveMQServer(configuration, mBeanServer1, enablePersistence()));
jmsServer1 = new JMSServerManagerImpl(server1, jmsconfig);
context1 = new InVMNamingContext();
jmsServer1.setRegistry(new JndiBindingRegistry(context1));
}
use of org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl in project activemq-artemis by apache.
the class JMSBridgeImplTest method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
Configuration config = createBasicConfig().addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
InVMNamingContext context = new InVMNamingContext();
jmsServer = new JMSServerManagerImpl(addServer(ActiveMQServers.newActiveMQServer(config, false)));
jmsServer.setRegistry(new JndiBindingRegistry(context));
jmsServer.start();
jmsServer.createQueue(false, JMSBridgeImplTest.SOURCE, null, true, "/queue/" + JMSBridgeImplTest.SOURCE);
jmsServer.createQueue(false, JMSBridgeImplTest.TARGET, null, true, "/queue/" + JMSBridgeImplTest.TARGET);
}
Aggregations