本文整理汇总了Java中org.springframework.jms.connection.CachingConnectionFactory.setTargetConnectionFactory方法的典型用法代码示例。如果您正苦于以下问题:Java CachingConnectionFactory.setTargetConnectionFactory方法的具体用法?Java CachingConnectionFactory.setTargetConnectionFactory怎么用?Java CachingConnectionFactory.setTargetConnectionFactory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.jms.connection.CachingConnectionFactory
的用法示例。
在下文中一共展示了CachingConnectionFactory.setTargetConnectionFactory方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: cachingConnectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
@Bean
public CachingConnectionFactory cachingConnectionFactory() {
CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
connectionFactory.setCacheConsumers(true);
connectionFactory.setReconnectOnException(true);
connectionFactory.setTargetConnectionFactory(connectionFactory());
return connectionFactory;
}
示例2: connectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
@Bean
public ConnectionFactory connectionFactory() {
CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();
activeMQConnectionFactory.setBrokerURL("tcp://localhost:61616");
cachingConnectionFactory.setTargetConnectionFactory(activeMQConnectionFactory);
cachingConnectionFactory.setSessionCacheSize(10);
cachingConnectionFactory.setCacheProducers(true);
cachingConnectionFactory.setReconnectOnException(true);
return cachingConnectionFactory;
}
示例3: amqConnectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
@Bean
public ConnectionFactory amqConnectionFactory() {
CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();
activeMQConnectionFactory.setBrokerURL("vm://localhost?broker.persistent=false");
cachingConnectionFactory.setTargetConnectionFactory(activeMQConnectionFactory);
cachingConnectionFactory.setSessionCacheSize(10);
cachingConnectionFactory.setCacheProducers(true);
cachingConnectionFactory.setReconnectOnException(true);
return cachingConnectionFactory;
}
示例4: jmsConnectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
@Bean
public ConnectionFactory jmsConnectionFactory(ActiveMQProperties properties){
ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();
activeMQConnectionFactory.setBrokerURL(properties.getBrokerUrl());
activeMQConnectionFactory.setUserName(properties.getUser());
activeMQConnectionFactory.setPassword(properties.getPassword());
CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
cachingConnectionFactory.setSessionCacheSize(10);
cachingConnectionFactory.setCacheConsumers(false);
cachingConnectionFactory.setTargetConnectionFactory(activeMQConnectionFactory);
return cachingConnectionFactory;
}
示例5: connectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
@Bean(name = "connectionFactory")
public CachingConnectionFactory connectionFactory() {
CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
cachingConnectionFactory.setTargetConnectionFactory(amqConnectionFactory());
cachingConnectionFactory.setSessionCacheSize(8);
cachingConnectionFactory.setExceptionListener(jmsExceptionListener());
return cachingConnectionFactory;
}
示例6: connectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
@Bean(name = "connectionFactory")
public CachingConnectionFactory connectionFactory() {
CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
cachingConnectionFactory.setTargetConnectionFactory(amqConnectionFactory());
cachingConnectionFactory.setSessionCacheSize(16);
cachingConnectionFactory.setExceptionListener(jmsExceptionListener());
return cachingConnectionFactory;
}
示例7: connectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
@Bean
public CachingConnectionFactory connectionFactory() {
CachingConnectionFactory ccf = new CachingConnectionFactory();
ccf.setTargetConnectionFactory(new ActiveMQConnectionFactory("vm://embedded?broker.persistent=false"));
return ccf;
}