本文整理汇总了Java中org.springframework.jms.support.destination.DynamicDestinationResolver类的典型用法代码示例。如果您正苦于以下问题:Java DynamicDestinationResolver类的具体用法?Java DynamicDestinationResolver怎么用?Java DynamicDestinationResolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DynamicDestinationResolver类属于org.springframework.jms.support.destination包,在下文中一共展示了DynamicDestinationResolver类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: myDestinationResolver
import org.springframework.jms.support.destination.DynamicDestinationResolver; //导入依赖的package包/类
/**
* Uses properties to attempt to map a JMS destination name to an actual
* queue/topic name.
*
* @param environment
* @return
*/
@Bean
public DestinationResolver myDestinationResolver(final Environment environment) {
return new DestinationResolver() {
private DestinationResolver dynamicDestinationResolver = new DynamicDestinationResolver();
@Override
public Destination resolveDestinationName(Session session, String destinationName,
boolean pubSubDomain) throws JMSException {
String dname = environment.getProperty("jms.destination." + destinationName,
destinationName);
if (LOG.isDebugEnabled()) {
LOG.debug("Resolved destination '" + destinationName + "' to '" + dname + "'");
}
return dynamicDestinationResolver.resolveDestinationName(session,
resolveName(environment, destinationName), pubSubDomain);
}
};
}
示例2: myDestinationResolver
import org.springframework.jms.support.destination.DynamicDestinationResolver; //导入依赖的package包/类
/**
* JAVADOC Method Level Comments
*
* @return JAVADOC.
*/
@Bean
public DestinationResolver myDestinationResolver(final Environment environment) {
return new DestinationResolver() {
private DestinationResolver dynamicDestinationResolver = new DynamicDestinationResolver();
@Override
public Destination resolveDestinationName(Session session, String destinationName,
boolean pubSubDomain) throws JMSException {
String dname = environment.getProperty("jms.destination." + destinationName,
destinationName);
if (LOG.isDebugEnabled()) {
LOG.debug("Resolved destination '" + destinationName + "' to '" + dname + "'");
}
return dynamicDestinationResolver.resolveDestinationName(session, dname,
pubSubDomain);
}
};
}
示例3: jmsListenerContainerFactory
import org.springframework.jms.support.destination.DynamicDestinationResolver; //导入依赖的package包/类
@Bean
public DefaultJmsListenerContainerFactory jmsListenerContainerFactory() throws JMSException {
DefaultJmsListenerContainerFactory factory =
new DefaultJmsListenerContainerFactory();
factory.setConnectionFactory(sqsConnectionFactory());
factory.setDestinationResolver(new DynamicDestinationResolver());
factory.setConcurrency("3-10");
factory.setSessionAcknowledgeMode(Session.CLIENT_ACKNOWLEDGE);
return factory;
}
示例4: jmsListenerContainerFactory
import org.springframework.jms.support.destination.DynamicDestinationResolver; //导入依赖的package包/类
@Bean
public DefaultJmsListenerContainerFactory jmsListenerContainerFactory() {
DefaultJmsListenerContainerFactory factory =
new DefaultJmsListenerContainerFactory();
factory.setConnectionFactory(connect());
factory.setDestinationResolver(new DynamicDestinationResolver());
factory.setConcurrency("3-10");
return factory;
}
示例5: destinationResolver
import org.springframework.jms.support.destination.DynamicDestinationResolver; //导入依赖的package包/类
@Bean
public DestinationResolver destinationResolver() {
return new DynamicDestinationResolver();
}
示例6: DestinationChecker
import org.springframework.jms.support.destination.DynamicDestinationResolver; //导入依赖的package包/类
private DestinationChecker(ApplicationContext applicationContext) {
this.jmsTemplate = applicationContext.getBean(JmsTemplate.class);
this.destinationResolver = new DynamicDestinationResolver();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:HornetQAutoConfigurationTests.java
示例7: destinationResolver
import org.springframework.jms.support.destination.DynamicDestinationResolver; //导入依赖的package包/类
@Bean
DestinationResolver destinationResolver() {
return new DynamicDestinationResolver();
}
示例8: setDestinationResolver
import org.springframework.jms.support.destination.DynamicDestinationResolver; //导入依赖的package包/类
/**
* Set the DestinationResolver that is to be used to resolve Queue
* references for this accessor.
* <p>The default resolver is a {@code DynamicDestinationResolver}. Specify a
* {@code JndiDestinationResolver} for resolving destination names as JNDI locations.
* @see org.springframework.jms.support.destination.DynamicDestinationResolver
* @see org.springframework.jms.support.destination.JndiDestinationResolver
*/
public void setDestinationResolver(DestinationResolver destinationResolver) {
this.destinationResolver =
(destinationResolver != null ? destinationResolver : new DynamicDestinationResolver());
}
示例9: setDestinationResolver
import org.springframework.jms.support.destination.DynamicDestinationResolver; //导入依赖的package包/类
/**
* Set the DestinationResolver that is to be used to resolve Queue
* references for this accessor.
* <p>The default resolver is a DynamicDestinationResolver. Specify a
* JndiDestinationResolver for resolving destination names as JNDI locations.
* @see org.springframework.jms.support.destination.DynamicDestinationResolver
* @see org.springframework.jms.support.destination.JndiDestinationResolver
*/
public void setDestinationResolver(DestinationResolver destinationResolver) {
this.destinationResolver =
(destinationResolver != null ? destinationResolver : new DynamicDestinationResolver());
}