Examples of PooledConnectionFactory


Examples of org.apache.activemq.jms.pool.PooledConnectionFactory

            }
        }
        if (pooledConnectionFactory == null) {
            try {
                LOGGER.debug("Trying to build a PooledConnectionFactory");
                PooledConnectionFactory f = new PooledConnectionFactory();
                f.setMaxConnections(maxConnections);
                f.setMaximumActiveSessionPerConnection(maximumActive);
                f.setConnectionFactory(connectionFactory);
                this.pooledConnectionFactory = f;
            } catch (Throwable t) {
                LOGGER.debug("Could not create pooled connection factory: " + t, t);
            }
        }
View Full Code Here

Examples of org.apache.activemq.pool.PooledConnectionFactory

        factory.setServiceClass(Greeter.class);
        factory.setAddress("jms://");

        JMSConfiguration jmsConfig = new JMSConfiguration();
        ConnectionFactory connectionFactory
            = new PooledConnectionFactory(broker.getBrokerURL());
        jmsConfig.setConnectionFactory(connectionFactory);
        jmsConfig.setTargetDestination("greeter.queue.noaop");
        jmsConfig.setPubSubDomain(false);
        jmsConfig.setUseJms11(true);
View Full Code Here

Examples of org.apache.activemq.pool.PooledConnectionFactory

public class JMSFlow extends AbstractJMSFlow {

    private PooledConnectionFactory factory;

    protected ConnectionFactory createConnectionFactoryFromUrl(String jmsURL) {
        factory = (jmsURL != null) ? new PooledConnectionFactory(jmsURL) : new PooledConnectionFactory();
        return factory;
    }
View Full Code Here

Examples of org.apache.activemq.pool.PooledConnectionFactory

    protected void createJmsConnectionFactory() throws Exception {
        connectionFactory = new ActiveMQConnectionFactory("vm://localhost");
    }

    protected void createJmsTemplate() throws Exception {
        jmsTemplate = new JmsTemplate(new PooledConnectionFactory(connectionFactory));
    }
View Full Code Here

Examples of org.apache.activemq.pool.PooledConnectionFactory

* @org.apache.xbean.XBean element="jmsFlow"
*/
public class JMSFlow extends AbstractJMSFlow {

    protected ConnectionFactory createConnectionFactoryFromUrl(String jmsURL) {
        return (jmsURL != null) ? new PooledConnectionFactory(jmsURL) : new PooledConnectionFactory();
    }
View Full Code Here

Examples of org.apache.activemq.pool.PooledConnectionFactory

        ActiveMQConnectionFactory cf1 = new ActiveMQConnectionFactory(brokerURI);
        RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();
        redeliveryPolicy.setMaximumRedeliveries(1);
        redeliveryPolicy.setInitialRedeliveryDelay(1000);
        cf1.setRedeliveryPolicy(redeliveryPolicy());
        cf = new PooledConnectionFactory(cf1);
        cff = new ConnectionFactoryFeature(cf);
    }
View Full Code Here

Examples of org.apache.activemq.pool.PooledConnectionFactory

    public synchronized CamelContext getCamelContext() {
      if (camelContext == null) {
        LOG.debug("Creating camel context");
        camelContext = new DefaultCamelContext();
        ActiveMQConfiguration conf = new ActiveMQConfiguration();
        conf.setConnectionFactory(new PooledConnectionFactory((ActiveMQConnectionFactory)factory));
        ActiveMQComponent component = new ActiveMQComponent(conf);
        camelContext.addComponent("activemq", component);
      }
      return camelContext;
    }
View Full Code Here

Examples of org.apache.activemq.pool.PooledConnectionFactory

    public synchronized CamelContext getCamelContext() {
      if (camelContext == null) {
        LOG.debug("Creating camel context");
        camelContext = new DefaultCamelContext();
        ActiveMQConfiguration conf = new ActiveMQConfiguration();
        conf.setConnectionFactory(new PooledConnectionFactory((ActiveMQConnectionFactory)factory));
        ActiveMQComponent component = new ActiveMQComponent(conf);
        camelContext.addComponent("activemq", component);
      }
      return camelContext;
    }
View Full Code Here

Examples of org.apache.activemq.pool.PooledConnectionFactory

    public synchronized CamelContext getCamelContext() {
      if (camelContext == null) {
        LOG.debug("Creating camel context");
        camelContext = new DefaultCamelContext();
        ActiveMQConfiguration conf = new ActiveMQConfiguration();
        conf.setConnectionFactory(new PooledConnectionFactory((ActiveMQConnectionFactory)factory));
        ActiveMQComponent component = new ActiveMQComponent(conf);
        camelContext.addComponent("activemq", component);
      }
      return camelContext;
    }
View Full Code Here

Examples of org.apache.activemq.pool.PooledConnectionFactory

     * @return a newly created JmsTemplate
     */
    protected JmsTemplate createJmsTemplate() {
        if (usePooledConnectionWithTemplate) {
            // lets use a pool to avoid creating and closing producers
            return new JmsTemplate(new PooledConnectionFactory(bindAddress));
        }
        else {
            return new JmsTemplate(connectionFactory);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.