本文整理汇总了Java中org.springframework.jms.connection.CachingConnectionFactory.setSessionCacheSize方法的典型用法代码示例。如果您正苦于以下问题:Java CachingConnectionFactory.setSessionCacheSize方法的具体用法?Java CachingConnectionFactory.setSessionCacheSize怎么用?Java CachingConnectionFactory.setSessionCacheSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.jms.connection.CachingConnectionFactory
的用法示例。
在下文中一共展示了CachingConnectionFactory.setSessionCacheSize方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: connectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
@Bean
public ConnectionFactory connectionFactory() {
ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(brokerUrl);
CachingConnectionFactory bean = new CachingConnectionFactory(activeMQConnectionFactory);
bean.setSessionCacheSize(sessionCacheSize);
return bean;
}
示例2: receiverConnectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
@Bean
public ConnectionFactory receiverConnectionFactory() {
ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(brokerUrl);
CachingConnectionFactory bean = new CachingConnectionFactory(activeMQConnectionFactory);
bean.setSessionCacheSize(sessionCacheSize);
return bean;
}
示例3: 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;
}
示例4: 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;
}
示例5: connectionFactory
import org.springframework.jms.connection.CachingConnectionFactory; //导入方法依赖的package包/类
public CachingConnectionFactory connectionFactory() {
ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(userName, password, brokerUrl);
// activeMQConnectionFactory.setAlwaysSessionAsync(true);
// activeMQConnectionFactory.setAlwaysSyncSend(true);
CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(activeMQConnectionFactory);
cachingConnectionFactory.setExceptionListener(jmsExceptionListener());
cachingConnectionFactory.setSessionCacheSize(sessionCacheSize);
return cachingConnectionFactory;
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}