Here are the examples of the java api class org.apache.activemq.artemis.tests.unit.util.InVMContext taken from open source projects.
1. XmlImportExportTest#basicSetUp()
Project: activemq-artemis
File: XmlImportExportTest.java
File: XmlImportExportTest.java
/** * @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)); }