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


Java CachingConnectionFactory.setSessionCacheSize方法代码示例

本文整理汇总了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;
}
 
开发者ID:EsikAntony,项目名称:camunda-task-dispatcher,代码行数:9,代码来源:JmsExternalTaskCompleterConfig.java

示例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;
}
 
开发者ID:EsikAntony,项目名称:camunda-task-dispatcher,代码行数:9,代码来源:JmsExternalTaskReceiverConfig.java

示例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;
}
 
开发者ID:przodownikR1,项目名称:springBatchJmsKata,代码行数:13,代码来源:JmsAmqConfig.java

示例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;
}
 
开发者ID:przodownikR1,项目名称:springBatchJmsKata,代码行数:13,代码来源:EmbeddedJmsConfig.java

示例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;

}
 
开发者ID:przodownikR1,项目名称:jmsKata,代码行数:12,代码来源:JmsConfig.java

示例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;
}
 
开发者ID:mrFlick72,项目名称:socialDocumentLibrary,代码行数:15,代码来源:MessagingConfig.java

示例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;
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:10,代码来源:AppConfig.java

示例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;
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:10,代码来源:AppConfig.java


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