本文整理汇总了Java中org.springframework.jms.core.JmsMessagingTemplate类的典型用法代码示例。如果您正苦于以下问题:Java JmsMessagingTemplate类的具体用法?Java JmsMessagingTemplate怎么用?Java JmsMessagingTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JmsMessagingTemplate类属于org.springframework.jms.core包,在下文中一共展示了JmsMessagingTemplate类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testDefaultJmsConfiguration
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@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);
assertEquals(jmsTemplate.getConnectionFactory(), connectionFactory);
assertEquals(jmsTemplate, messagingTemplate.getJmsTemplate());
assertEquals(ACTIVEMQ_EMBEDDED_URL,
((ActiveMQConnectionFactory) jmsTemplate.getConnectionFactory())
.getBrokerURL());
assertTrue("listener container factory should be created by default",
this.context.containsBean("jmsListenerContainerFactory"));
}
示例2: testDefaultJmsConfiguration
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@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();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:15,代码来源:JmsAutoConfigurationTests.java
示例3: testJmsMessagingTemplateBackOff
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@Test
public void testJmsMessagingTemplateBackOff() {
load(TestConfiguration5.class);
JmsMessagingTemplate messagingTemplate = this.context
.getBean(JmsMessagingTemplate.class);
assertThat(messagingTemplate.getDefaultDestinationName()).isEqualTo("fooBar");
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:JmsAutoConfigurationTests.java
示例4: testJmsTemplateBackOffEverything
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@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);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:14,代码来源:JmsAutoConfigurationTests.java
示例5: jmsMessagingTemplate
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@Bean
JmsMessagingTemplate jmsMessagingTemplate(JmsTemplate jmsTemplate) {
JmsMessagingTemplate messagingTemplate = new JmsMessagingTemplate(
jmsTemplate);
messagingTemplate.setDefaultDestinationName("fooBar");
return messagingTemplate;
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:JmsAutoConfigurationTests.java
示例6: testJmsMessagingTemplateBackOff
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@Test
public void testJmsMessagingTemplateBackOff() {
load(TestConfiguration5.class);
JmsMessagingTemplate messagingTemplate = this.context
.getBean(JmsMessagingTemplate.class);
assertEquals("fooBar", messagingTemplate.getDefaultDestinationName());
}
示例7: testJmsTemplateBackOffEverything
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@Test
public void testJmsTemplateBackOffEverything() {
this.context = createContext(TestConfiguration2.class, TestConfiguration3.class,
TestConfiguration5.class);
JmsTemplate jmsTemplate = this.context.getBean(JmsTemplate.class);
assertEquals(999, jmsTemplate.getPriority());
assertEquals("foobar",
this.context.getBean(ActiveMQConnectionFactory.class).getBrokerURL());
JmsMessagingTemplate messagingTemplate = this.context
.getBean(JmsMessagingTemplate.class);
assertEquals("fooBar", messagingTemplate.getDefaultDestinationName());
assertEquals(jmsTemplate, messagingTemplate.getJmsTemplate());
}
示例8: jmsMessagingTemplate
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
@ConditionalOnSingleCandidate(JmsTemplate.class)
public JmsMessagingTemplate jmsMessagingTemplate(JmsTemplate jmsTemplate) {
return new JmsMessagingTemplate(jmsTemplate);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:7,代码来源:JmsAutoConfiguration.java
示例9: jmsMessagingTemplate
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@Bean
public JmsMessagingTemplate jmsMessagingTemplate(JmsTemplate jmsTemplate) {
return new JmsMessagingTemplate(jmsTemplate);
}
示例10: getJmsTemplate
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
public JmsMessagingTemplate getJmsTemplate() {
final JmsMessagingTemplate template = new JmsMessagingTemplate(connectionFactory());
template.setDefaultDestination(mailbox());
return template;
}
示例11: jmsMessagingTemplate
import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
@Bean
// this is here to bypass errors with auto-configuration since we have
// multiple JMS templates
JmsMessagingTemplate jmsMessagingTemplate() {
return new JmsMessagingTemplate(jobTopicTemplate());
}