当前位置: 首页>>代码示例>>Java>>正文


Java JmsMessagingTemplate类代码示例

本文整理汇总了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"));
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:17,代码来源:JmsAutoConfigurationTests.java

示例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());
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:8,代码来源:JmsAutoConfigurationTests.java

示例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());
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:14,代码来源:JmsAutoConfigurationTests.java

示例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);
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:5,代码来源:JmsAutoConfiguration.java

示例10: getJmsTemplate

import org.springframework.jms.core.JmsMessagingTemplate; //导入依赖的package包/类
public JmsMessagingTemplate getJmsTemplate() {
    final JmsMessagingTemplate template = new JmsMessagingTemplate(connectionFactory());
    template.setDefaultDestination(mailbox());
    return template;
}
 
开发者ID:przodownikR1,项目名称:jmsKata,代码行数:6,代码来源:JmsConfig.java

示例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());
}
 
开发者ID:cfagiani,项目名称:datasponge,代码行数:7,代码来源:DataSponge.java


注:本文中的org.springframework.jms.core.JmsMessagingTemplate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。