Example usage for org.springframework.jms.connection CachingConnectionFactory setCacheProducers

List of usage examples for org.springframework.jms.connection CachingConnectionFactory setCacheProducers

Introduction

In this page you can find the example usage for org.springframework.jms.connection CachingConnectionFactory setCacheProducers.

Prototype

public void setCacheProducers(boolean cacheProducers) 

Source Link

Document

Specify whether to cache JMS MessageProducers per JMS Session instance (more specifically: one MessageProducer per Destination and Session).

Usage

From source file:com.apress.prospringintegration.JmsConfiguration.java

@Bean(name = "connectionFactory")
public ConnectionFactory getConnectionFactory() {
    ActiveMQConnectionFactory targetConnectionFactory = new ActiveMQConnectionFactory();
    targetConnectionFactory.setBrokerURL("vm://localhost");

    CachingConnectionFactory connectionFactory = new CachingConnectionFactory(targetConnectionFactory);
    connectionFactory.setSessionCacheSize(10);
    connectionFactory.setCacheProducers(false);

    return connectionFactory;
}

From source file:com.apress.prospringintegration.messagehistory.JmsConfiguration.java

@Bean
public ConnectionFactory connectionFactory() {
    ActiveMQConnectionFactory targetConnectionFactory = new ActiveMQConnectionFactory();
    targetConnectionFactory.setBrokerURL("vm://localhost");

    CachingConnectionFactory connectionFactory = new CachingConnectionFactory(targetConnectionFactory);
    connectionFactory.setSessionCacheSize(10);
    connectionFactory.setCacheProducers(false);

    return connectionFactory;
}

From source file:com.apress.prospringintegration.messaging.hornetq.jms.adapter.HornetqConfiguration.java

@Bean
public CachingConnectionFactory connectionFactory() {
    CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
    cachingConnectionFactory.setSessionCacheSize(10);
    cachingConnectionFactory.setCacheProducers(false);
    cachingConnectionFactory.setTargetConnectionFactory(hornetQConnectionFactory());
    return cachingConnectionFactory;
}

From source file:edu.berkeley.path.next.CTMEngine.JmsConfiguration.java

@Bean
public ConnectionFactory connectionFactory() {
    ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory();
    activeMQConnectionFactory.setBrokerURL("tcp://localhost:61616");

    CachingConnectionFactory connectionFactory = new CachingConnectionFactory(activeMQConnectionFactory);
    connectionFactory.setSessionCacheSize(10);
    connectionFactory.setCacheProducers(false);

    return connectionFactory;
}

From source file:com.apress.prospringintegration.transform.IntegrationConfiguration.java

@Bean
public CachingConnectionFactory cachingConnectionFactory() {
    CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
    cachingConnectionFactory.setTargetConnectionFactory(activeMQConnectionFactory());
    cachingConnectionFactory.setSessionCacheSize(10);
    cachingConnectionFactory.setCacheProducers(false);
    return cachingConnectionFactory;
}