use of org.apache.activemq.artemis.jms.server.config.impl.JMSQueueConfigurationImpl in project activemq-artemis by apache.
the class ManualReconnectionToSingleServerTest method setUp.
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
@Override
@Before
public void setUp() throws Exception {
super.setUp();
context = new InVMNamingContext();
server = createServer(false, createDefaultNettyConfig());
JMSConfiguration configuration = new JMSConfigurationImpl();
serverManager = new JMSServerManagerImpl(server, configuration);
serverManager.setRegistry(new JndiBindingRegistry(context));
configuration.getQueueConfigurations().add(new JMSQueueConfigurationImpl().setName(QUEUE_NAME).setBindings(QUEUE_NAME));
ArrayList<TransportConfiguration> configs = new ArrayList<>();
configs.add(new TransportConfiguration(NETTY_CONNECTOR_FACTORY));
ConnectionFactoryConfiguration cfConfig = new ConnectionFactoryConfigurationImpl().setName("cf").setConnectorNames(registerConnectors(server, configs)).setBindings("/cf").setRetryInterval(1000).setReconnectAttempts(-1);
configuration.getConnectionFactoryConfigurations().add(cfConfig);
serverManager.start();
listener = new Listener();
exceptionLatch = new CountDownLatch(1);
reconnectionLatch = new CountDownLatch(1);
allMessagesReceived = new CountDownLatch(1);
}
use of org.apache.activemq.artemis.jms.server.config.impl.JMSQueueConfigurationImpl in project spring-boot by spring-projects.
the class ArtemisEmbeddedServerConfiguration method addQueues.
private void addQueues(JMSConfiguration configuration, String[] queues) {
boolean persistent = this.properties.getEmbedded().isPersistent();
for (String queue : queues) {
JMSQueueConfigurationImpl jmsQueueConfiguration = new JMSQueueConfigurationImpl();
jmsQueueConfiguration.setName(queue);
jmsQueueConfiguration.setDurable(persistent);
jmsQueueConfiguration.setBindings("/queue/" + queue);
configuration.getQueueConfigurations().add(jmsQueueConfiguration);
}
}
Aggregations