Examples of XaPooledConnectionFactory


Examples of org.apache.activemq.pool.XaPooledConnectionFactory

        return port;
    }

    protected ConnectionFactory createConnectionFactory() {
        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:" + port);
        XaPooledConnectionFactory cnf = new XaPooledConnectionFactory(cf);
        cnf.setTransactionManager(transactionManager);
        return cnf;
    }
View Full Code Here

Examples of org.apache.activemq.pool.XaPooledConnectionFactory

        return port;
    }

    protected ConnectionFactory createConnectionFactory() {
        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:" + port);
        XaPooledConnectionFactory cnf = new XaPooledConnectionFactory(cf);
        cnf.setTransactionManager(transactionManager);
        return cnf;
    }
View Full Code Here

Examples of org.apache.activemq.pool.XaPooledConnectionFactory

    private Connection createXAConnection(String name, TransactionManager tm) throws JMSException {
        ActiveMQXAConnectionFactory cf = new ActiveMQXAConnectionFactory("vm://" + name
                                                                         + "?broker.persistent=false");
        cf.setRedeliveryPolicy(redeliveryPolicy());
        XaPooledConnectionFactory cfp = new XaPooledConnectionFactory(cf);
        cfp.setTransactionManager(tm);
        cfp.setConnectionFactory(cf);
        Connection connection = cfp.createConnection();
        connection.start();
        return connection;
    }
View Full Code Here

Examples of org.jencks.amqpool.XaPooledConnectionFactory

            }
        }
        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.