List of usage examples for org.springframework.jms.connection CachingConnectionFactory CachingConnectionFactory
public 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: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: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()); }//w ww . ja v a 2s . co m cachingConnectionFactory.setTargetConnectionFactory(connectionFactory); cachingConnectionFactory.setSessionCacheSize(100); cachingConnectionFactory.setCacheConsumers(true); 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.jmstoolkit.queuebrowser.QueueBrowserView.java
private void _init() { try {//from w ww . j av a2s . c o m Settings.loadSystemSettings(System.getProperty(D_JNDI_PROPERTIES, D_JNDI_PROPERTIES)); // load settings from default file: app.properties // which contains previously used connection // factories and destinations Settings.loadSettings(appProperties); connectionFactoryList = Settings.getSettings(appProperties, P_CONNECTION_FACTORIES); destinationList = Settings.getSettings(appProperties, P_DESTINATIONS); } catch (JTKException se) { // this happens BEFORE initComponents, so can't put the error in the // status area or any other part of the GUI System.out.println(se.toStringWithStackTrace()); } // FIXME: Not using the applicationContext at all... ho hum this.jmsTemplate = new JmsTemplate(); this.connectionFactory = new CachingConnectionFactory(); this.connectionFactory.setCacheProducers(true); this.jmsTemplate.setConnectionFactory(connectionFactory); this.jndiTemplate = new JndiTemplate(); }