Examples of AMQConnectionFactory


Examples of org.apache.qpid.client.AMQConnectionFactory

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

Examples of org.apache.qpid.client.AMQConnectionFactory

     */
    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

Examples of org.apache.qpid.client.AMQConnectionFactory

                            "'tcp://%s:%s?retries='%s'&connectdelay='%s''&failover='singlebroker?cyclecount='%s''";

        String newUrl = String.format(newUrlFormat, origBrokerDetails.getHost(), origBrokerDetails.getPort(),
                                                    retries, connectdelay, cycleCount);

        ConnectionFactory connectionFactory = new AMQConnectionFactory(newUrl);
        AMQConnection connection = (AMQConnection) connectionFactory.createConnection("admin", "admin");
        connection.setConnectionListener(this);
        return connection;
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionFactory

    @Override
    public Reference getReference() throws NamingException
    {
        try
        {
            _delegate = new AMQConnectionFactory(getConnectionURL());
            /*
            QpidResourceAdapter ra = new QpidResourceAdapter();
            QpidRAManagedConnectionFactory mcf = new QpidRAManagedConnectionFactory();
            mcf.setResourceAdapter(ra);
            mcf.setConnectionURL(getConnectionURL());
View Full Code Here

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

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

Examples of org.apache.qpid.client.AMQConnectionFactory

    }

    private AMQConnection createConnectionWithFailover() throws NamingException, JMSException
    {
        AMQConnection connection;
        AMQConnectionFactory connectionFactory = (AMQConnectionFactory)getConnectionFactory("default");
        ConnectionURL connectionURL = connectionFactory.getConnectionURL();
        connectionURL.setOption(ConnectionURL.OPTIONS_FAILOVER, "singlebroker");
        connectionURL.setOption(ConnectionURL.OPTIONS_FAILOVER_CYCLE, "2");
        BrokerDetails details = connectionURL.getBrokerDetails(0);
        details.setProperty(BrokerDetails.OPTIONS_RETRY, "200");
        details.setProperty(BrokerDetails.OPTIONS_CONNECT_DELAY, "1000");

        connection = (AMQConnection)connectionFactory.createConnection("admin", "admin");
        connection.setConnectionListener(this);
        return connection;
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionFactory

    public AMQPComponent(AMQConnectionFactory connectionFactory) {
        setConnectionFactory(connectionFactory);
    }

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

Examples of org.apache.qpid.client.AMQConnectionFactory

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

Examples of org.apache.qpid.client.AMQConnectionFactory


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