Search in sources :

Example 1 with NullInitialContext

use of org.apache.activemq.artemis.tests.integration.jms.server.management.NullInitialContext in project activemq-artemis by apache.

the class FailureDeadlockTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    server = createServer(false, createDefaultInVMConfig());
    jmsServer = new JMSServerManagerImpl(server);
    jmsServer.setRegistry(new JndiBindingRegistry(new NullInitialContext()));
    jmsServer.start();
    cf1 = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
    cf2 = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
}
Also used : JMSServerManagerImpl(org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl) NullInitialContext(org.apache.activemq.artemis.tests.integration.jms.server.management.NullInitialContext) JndiBindingRegistry(org.apache.activemq.artemis.core.registry.JndiBindingRegistry) TransportConfiguration(org.apache.activemq.artemis.api.core.TransportConfiguration) Before(org.junit.Before)

Example 2 with NullInitialContext

use of org.apache.activemq.artemis.tests.integration.jms.server.management.NullInitialContext in project activemq-artemis by apache.

the class ExceptionListenerTest method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    server = addServer(ActiveMQServers.newActiveMQServer(createDefaultInVMConfig(), false));
    jmsServer = new JMSServerManagerImpl(server);
    jmsServer.setRegistry(new JndiBindingRegistry(new NullInitialContext()));
    jmsServer.start();
    jmsServer.createQueue(false, ExceptionListenerTest.Q_NAME, null, true, ExceptionListenerTest.Q_NAME);
    cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY));
    cf.setBlockOnDurableSend(true);
    cf.setPreAcknowledge(true);
}
Also used : JMSServerManagerImpl(org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl) NullInitialContext(org.apache.activemq.artemis.tests.integration.jms.server.management.NullInitialContext) JndiBindingRegistry(org.apache.activemq.artemis.core.registry.JndiBindingRegistry) TransportConfiguration(org.apache.activemq.artemis.api.core.TransportConfiguration) Before(org.junit.Before)

Aggregations

TransportConfiguration (org.apache.activemq.artemis.api.core.TransportConfiguration)2 JndiBindingRegistry (org.apache.activemq.artemis.core.registry.JndiBindingRegistry)2 JMSServerManagerImpl (org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl)2 NullInitialContext (org.apache.activemq.artemis.tests.integration.jms.server.management.NullInitialContext)2 Before (org.junit.Before)2