use of org.springframework.jms.core.JmsMessagingTemplate in project spring-boot by spring-projects.
the class JmsAutoConfigurationTests method testDefaultJmsConfiguration.
@Test
public void testDefaultJmsConfiguration() {
load(TestConfiguration.class);
ActiveMQConnectionFactory connectionFactory = this.context.getBean(ActiveMQConnectionFactory.class);
JmsTemplate jmsTemplate = this.context.getBean(JmsTemplate.class);
JmsMessagingTemplate messagingTemplate = this.context.getBean(JmsMessagingTemplate.class);
assertThat(connectionFactory).isEqualTo(jmsTemplate.getConnectionFactory());
assertThat(messagingTemplate.getJmsTemplate()).isEqualTo(jmsTemplate);
assertThat(((ActiveMQConnectionFactory) jmsTemplate.getConnectionFactory()).getBrokerURL()).isEqualTo(ACTIVEMQ_EMBEDDED_URL);
assertThat(this.context.containsBean("jmsListenerContainerFactory")).isTrue();
}
use of org.springframework.jms.core.JmsMessagingTemplate in project spring-boot by spring-projects.
the class JmsAutoConfigurationTests method testJmsMessagingTemplateBackOff.
@Test
public void testJmsMessagingTemplateBackOff() {
load(TestConfiguration5.class);
JmsMessagingTemplate messagingTemplate = this.context.getBean(JmsMessagingTemplate.class);
assertThat(messagingTemplate.getDefaultDestinationName()).isEqualTo("fooBar");
}
use of org.springframework.jms.core.JmsMessagingTemplate in project spring-boot by spring-projects.
the class JmsAutoConfigurationTests method testJmsTemplateBackOffEverything.
@Test
public void testJmsTemplateBackOffEverything() {
this.context = createContext(TestConfiguration2.class, TestConfiguration3.class, TestConfiguration5.class);
JmsTemplate jmsTemplate = this.context.getBean(JmsTemplate.class);
assertThat(jmsTemplate.getPriority()).isEqualTo(999);
assertThat(this.context.getBean(ActiveMQConnectionFactory.class).getBrokerURL()).isEqualTo("foobar");
JmsMessagingTemplate messagingTemplate = this.context.getBean(JmsMessagingTemplate.class);
assertThat(messagingTemplate.getDefaultDestinationName()).isEqualTo("fooBar");
assertThat(messagingTemplate.getJmsTemplate()).isEqualTo(jmsTemplate);
}
Aggregations