Package org.apache.qpid.client

Examples of org.apache.qpid.client.AMQConnectionFactory


    }

    public Connection getConnection(ConnectionURL url) throws JMSException
    {
        _logger.info(url.getURL());
        Connection connection = new AMQConnectionFactory(url).createConnection(url.getUsername(), url.getPassword());

        _connections.add(connection);

        return connection;
    }
View Full Code Here


     */
    protected ConnectionFactory createFactory(String url) throws ConfigurationException
    {
        try
        {
            return new AMQConnectionFactory(url);
        }
        catch (URLSyntaxException urlse)
        {
            _logger.warn("Unable to create factory:" + urlse);

View Full Code Here

     */
    public void testIsSameRMMultiCF() throws Exception
    {
        startBroker(FAILING_PORT);
        ConnectionURL url = getConnectionFactory(FACTORY_NAME).getConnectionURL();
        XAConnectionFactory factory = new AMQConnectionFactory(url);
        XAConnectionFactory factory2 = new AMQConnectionFactory(url);
        XAConnectionFactory factory3 = getConnectionFactory(ALT_FACTORY_NAME);
       
        XAConnection conn = factory.createXAConnection("guest","guest");
        XAConnection conn2 = factory2.createXAConnection("guest","guest");
        XAConnection conn3 = factory3.createXAConnection("guest","guest");
       
        XASession session = conn.createXASession();
        XASession session2 = conn2.createXASession();
        XASession session3 = conn3.createXASession();
View Full Code Here

* @version $Revision: 1.1 $
*/
public class AMQPComponent extends JmsComponent {

    public static Component amqpComponent(String uri) throws URLSyntaxException {
        AMQConnectionFactory connectionFactory = new AMQConnectionFactory(uri);
        return new AMQPComponent(connectionFactory);
    }
View Full Code Here

   
    /**
     * Lets install the default connection factory
     */
    private void init() {
        AMQConnectionFactory connectionFactory = new AMQConnectionFactory();
        setConnectionFactory(connectionFactory);
    }
View Full Code Here

        options.setLogConfigFile("src/test/conf/qpid/log4j.xml");
        options.addPort(port);
        broker.startup(options);
        // null means the default virtual host
        virtualHost = ApplicationRegistry.getInstance().getVirtualHostRegistry().getVirtualHost(null);
        connectionFactory = new AMQConnectionFactory("amqp://guest:guest@clientid/" + virtualHost.getName() + "?brokerlist='tcp://localhost:" + port + "'");
    }
View Full Code Here

    /**
     * Create a BDBStoreUpgradeTestPreparer instance
     */
    public BDBStoreUpgradeTestPreparer () throws URLSyntaxException
    {
        _connFac = new AMQConnectionFactory(CONN_URL);
    }
View Full Code Here


    public Connection getConnection(ConnectionURL url) throws JMSException
    {
        _logger.debug("get connection for " + url.getURL());
        Connection connection = new AMQConnectionFactory(url).createConnection(url.getUsername(), url.getPassword());

        _connections.add(connection);

        return connection;
    }
View Full Code Here

            usedBrokers++;

            TransportConnection.createVMBroker(usedBrokers);
        }

        conFactory = new AMQConnectionFactory(String.format(BROKER, usedBrokers - 1, usedBrokers));
        _logger.info("Connecting on:" + conFactory.getConnectionURL());
        con = conFactory.createConnection();
        ((AMQConnection) con).setConnectionListener(this);
        con.start();
        failoverComplete = new CountDownLatch(1);
View Full Code Here

    }

    // This test disabled so that it doesn't add 4 minnutes to the length of time it takes to run, which would be lame
    public void txest4MinuteFailover() throws Exception
    {
        conFactory = new AMQConnectionFactory("amqp://guest:guest@/test?brokerlist='vm://:"+(usedBrokers-1)+"?connectdelay='60000'&retries='2''");
        _logger.info("Connecting on:" + conFactory.getConnectionURL());
        con = conFactory.createConnection();
        ((AMQConnection) con).setConnectionListener(this);
        con.start();
View Full Code Here

TOP

Related Classes of org.apache.qpid.client.AMQConnectionFactory

Copyright © 2018 www.massapicom. 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.