use of org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory in project spring-boot by spring-projects.
the class ArtemisAutoConfigurationTests method nativeConnectionFactoryIfEmbeddedServiceDisabledExplicitly.
@Test
public void nativeConnectionFactoryIfEmbeddedServiceDisabledExplicitly() {
// No mode is specified
load(EmptyConfiguration.class, "spring.artemis.embedded.enabled:false");
assertThat(this.context.getBeansOfType(EmbeddedJMS.class)).isEmpty();
ActiveMQConnectionFactory connectionFactory = this.context.getBean(ActiveMQConnectionFactory.class);
assertNettyConnectionFactory(connectionFactory, "localhost", 61616);
}
use of org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory in project spring-boot by spring-projects.
the class ArtemisAutoConfigurationTests method nativeConnectionFactoryCustomHost.
@Test
public void nativeConnectionFactoryCustomHost() {
load(EmptyConfiguration.class, "spring.artemis.mode:native", "spring.artemis.host:192.168.1.144", "spring.artemis.port:9876");
ActiveMQConnectionFactory connectionFactory = this.context.getBean(ActiveMQConnectionFactory.class);
assertNettyConnectionFactory(connectionFactory, "192.168.1.144", 9876);
}
use of org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory in project spring-boot by spring-projects.
the class ArtemisAutoConfigurationTests method embeddedConnectionFactory.
@Test
public void embeddedConnectionFactory() {
load(EmptyConfiguration.class, "spring.artemis.mode:embedded");
ArtemisProperties properties = this.context.getBean(ArtemisProperties.class);
assertThat(properties.getMode()).isEqualTo(ArtemisMode.EMBEDDED);
assertThat(this.context.getBeansOfType(EmbeddedJMS.class)).hasSize(1);
org.apache.activemq.artemis.core.config.Configuration configuration = this.context.getBean(org.apache.activemq.artemis.core.config.Configuration.class);
assertThat(configuration.isPersistenceEnabled()).isFalse();
assertThat(configuration.isSecurityEnabled()).isFalse();
ActiveMQConnectionFactory connectionFactory = this.context.getBean(ActiveMQConnectionFactory.class);
assertInVmConnectionFactory(connectionFactory);
}
use of org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory in project ddf by codice.
the class ActiveMQJMSClientFactoryWrapper method createConnectionFactory.
public ActiveMQConnectionFactory createConnectionFactory() throws Exception {
ActiveMQConnectionFactory connectionFactory = ActiveMQJMSClient.createConnectionFactory(PropertyResolver.resolveProperties(url), name).setUser(username).setPassword(encryptionService.decryptValue(new String(password)));
connectionFactory.setRetryInterval(retryInterval);
connectionFactory.setRetryIntervalMultiplier(retryIntervalMultiplier);
connectionFactory.setReconnectAttempts(reconnectAttempts);
return connectionFactory;
}
use of org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory in project ddf by codice.
the class ActiveMQJMSClientFactoryWrapperTest method createConnectionFactory.
@Test
public void createConnectionFactory() throws Exception {
ActiveMQConnectionFactory activeMQConnectionFactory = activeMQJMSClientFactoryWrapper.createConnectionFactory();
assertThat(activeMQConnectionFactory, notNullValue());
}
Aggregations