Search in sources :

Example 1 with InVMContext

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));
}
Also used : JMSServerManagerImpl(org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl) TransportConfiguration(org.apache.activemq.artemis.api.core.TransportConfiguration) JndiBindingRegistry(org.apache.activemq.artemis.core.registry.JndiBindingRegistry) InVMContext(org.apache.activemq.artemis.tests.unit.util.InVMContext)

Aggregations

TransportConfiguration (org.apache.activemq.artemis.api.core.TransportConfiguration)1 JndiBindingRegistry (org.apache.activemq.artemis.core.registry.JndiBindingRegistry)1 JMSServerManagerImpl (org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl)1 InVMContext (org.apache.activemq.artemis.tests.unit.util.InVMContext)1