use of org.apache.activemq.artemis.tests.unit.util.InVMContext in project activemq-artemis by apache.
the class XmlImportExportTest method basicSetUp.
/**
* @return ClientSession
* @throws Exception
*/
private ClientSession basicSetUp() throws Exception {
server = createServer(true);
server.getConfiguration().getConnectorConfigurations().put("in-vm1", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
server.getConfiguration().getConnectorConfigurations().put("in-vm2", new TransportConfiguration(INVM_CONNECTOR_FACTORY));
jmsServer = new JMSServerManagerImpl(server);
addActiveMQComponent(jmsServer);
namingContext = new InVMContext();
jmsServer.setRegistry(new JndiBindingRegistry(namingContext));
jmsServer.start();
locator = createInVMNonHALocator();
factory = createSessionFactory(locator);
checkForLongs();
return addClientSession(factory.createSession(false, true, true));
}
Aggregations