List of usage examples for org.springframework.jms.connection CachingConnectionFactory setTargetConnectionFactory
public void setTargetConnectionFactory(@Nullable ConnectionFactory targetConnectionFactory)
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; }
From source file:com.apress.prospringintegration.messaging.qpid.jms.adapter.QpidConfiguration.java
@Bean public CachingConnectionFactory connectionFactory() { CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(); cachingConnectionFactory.setTargetConnectionFactory(connectionFactory); cachingConnectionFactory.setSessionCacheSize(10); return cachingConnectionFactory; }
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:io.galeb.health.configurations.JMSConfiguration.java
@Bean(name = "connectionFactory") public CachingConnectionFactory cachingConnectionFactory() throws JMSException { CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(); ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(BROKER_CONN); connectionFactory.setUser(BROKER_USER); connectionFactory.setPassword(BROKER_PASS); if (BROKER_HA) { connectionFactory.setConnectionLoadBalancingPolicyClassName( RoundRobinConnectionLoadBalancingPolicy.class.getName()); }//from ww w . j a v a 2 s . co m cachingConnectionFactory.setTargetConnectionFactory(connectionFactory); cachingConnectionFactory.setSessionCacheSize(100); cachingConnectionFactory.setCacheConsumers(true); return cachingConnectionFactory; }