Examples of JcaPooledConnectionFactory


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

        }
        bus = BusFactory.getDefaultBus();
        registerTransactionManager();
        ActiveMQXAConnectionFactory cf1 = new ActiveMQXAConnectionFactory(brokerURI);
        cf1.setRedeliveryPolicy(redeliveryPolicy());
        JcaPooledConnectionFactory pcf = new JcaPooledConnectionFactory();
        pcf.setTransactionManager(transactionManager);
        pcf.setConnectionFactory(cf1);
        cf = pcf;
        cff = new ConnectionFactoryFeature(pcf);
    }
View Full Code Here

Examples of org.jencks.amqpool.JcaPooledConnectionFactory

    public void afterPropertiesSet() throws Exception {
        if (pooledConnectionFactory == null && transactionManager != null && name != null) {
            try {
                LOGGER.debug("Trying to build a JcaPooledConnectionFactory");
                JcaPooledConnectionFactory f = new JcaPooledConnectionFactory();
                f.setName(name);
                f.setTransactionManager((TransactionManager) transactionManager);
                f.setMaxConnections(maxConnections);
                f.setMaximumActive(maximumActive);
                f.setConnectionFactory(connectionFactory);
                f.setPoolFactory(poolFactory);
                this.pooledConnectionFactory = f;
            } catch (Throwable t) {
                LOGGER.debug("Could not create JCA enabled connection factory: " + t, t);
            }
        }
        if (pooledConnectionFactory == null && transactionManager != null) {
            try {
                LOGGER.debug("Trying to build a XaPooledConnectionFactory");
                XaPooledConnectionFactory f = new XaPooledConnectionFactory();
                f.setTransactionManager((TransactionManager) transactionManager);
                f.setMaxConnections(maxConnections);
                f.setMaximumActive(maximumActive);
                f.setConnectionFactory(connectionFactory);
                f.setPoolFactory(poolFactory);
                this.pooledConnectionFactory = f;
            } catch (Throwable t) {
                LOGGER.debug("Could not create XA enabled connection factory: " + t, t);
            }
        }
        if (pooledConnectionFactory == null) {
            try {
                LOGGER.debug("Trying to build a PooledConnectionFactory");
                PooledConnectionFactory f = new PooledConnectionFactory();
                f.setMaxConnections(maxConnections);
                f.setMaximumActive(maximumActive);
                f.setConnectionFactory(connectionFactory);
                f.setPoolFactory(poolFactory);
                this.pooledConnectionFactory = f;
            } catch (Throwable t) {
                LOGGER.debug("Could not create pooled connection factory: " + t, t);
            }
        }
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.