Examples of AMQConnectionURL


Examples of org.apache.qpid.client.AMQConnectionURL

            String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s?ssl='true''";

            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT);
           
            Connection con = getConnection(new AMQConnectionURL(url));
            assertNotNull("connection should be successful", con);
            Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
            assertNotNull("create session should be successful", ssn);
        }       
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            QpidBrokerTestCase.DEFAULT_SSL_PORT +
            "?ssl='true'&ssl_verify_hostname='true''";
           
            try
            {
                getConnection(new AMQConnectionURL(url));
                fail("Hostname verification failed. No exception was thrown");
            }
            catch (Exception e)
            {
                verifyExceptionCausesContains(e, "SSL hostname verification failed");
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" +
            QpidBrokerTestCase.DEFAULT_SSL_PORT +
            "?ssl='true'&ssl_verify_hostname='true''";

            Connection con = getConnection(new AMQConnectionURL(url));
            assertNotNull("connection should have been created", con);
        }
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost.localdomain:" +
            QpidBrokerTestCase.DEFAULT_SSL_PORT +
            "?ssl='true'&ssl_verify_hostname='true''";

            Connection con = getConnection(new AMQConnectionURL(url));
            assertNotNull("connection should have been created", con);
        }       
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            "&trust_store='%s'&trust_store_password='%s'" +
            "'";

            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT, TRUSTSTORE,TRUSTSTORE_PASSWORD);

            Connection con = getConnection(new AMQConnectionURL(url));
            assertNotNull("connection should be successful", con);
            Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
            assertNotNull("create session should be successful", ssn);
        }       
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

            "?ssl='true'&trust_store='%s'&trust_store_password='%s''";

            url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT,TRUSTSTORE,TRUSTSTORE_PASSWORD);
            try
            {
                Connection con = getConnection(new AMQConnectionURL(url));
                if(!shouldSucceed)
                {
                    fail("Connection succeeded, expected exception was not thrown");
                }
                else
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

     * Convenience method to build an {@link AMQConnectionURL} with the right parameters.
     */
    public AMQConnectionURL createConnectionURL(String vhost, String username, String password) throws URLSyntaxException
    {
        String url = "amqp://" + username + ":" + password + "@clientid/" + vhost + "?brokerlist='" + getBroker() + "?retries='0''";
        return new AMQConnectionURL(url);
    }
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

        super.setUp();
        try
        {
            //Try to get a connection to the 'test2' vhost
            //This is expected to succeed as it is allowed at the vhost level
            getConnection(new AMQConnectionURL("amqp://guest:guest@clientid/test2?brokerlist='" + getBroker() + "'"));
        }
        catch (JMSException e)
        {
            e.getLinkedException().printStackTrace();
            fail("The connection was expected to succeed: " + e.getMessage());
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

        super.setUp();
        try
        {
            //Try to get a connection to the 'test2' vhost
            //This is expected to fail as it is denied at the vhost level
            getConnection(new AMQConnectionURL("amqp://guest:guest@clientid/test2?brokerlist='" + getBroker() + "'"));
            fail("The connection was expected to fail");
        }
        catch (JMSException e)
        {
            //ignore
View Full Code Here

Examples of org.apache.qpid.client.AMQConnectionURL

{
    public void testFailoverURL() throws URLSyntaxException
    {
        String url = "amqp://ritchiem:bob@/test?brokerlist='tcp://localhost:5672;tcp://fancyserver:3000/',failover='roundrobin?cyclecount='100''";

        ConnectionURL connectionurl = new AMQConnectionURL(url);

        assertTrue(connectionurl.getFailoverMethod().equals("roundrobin"));
        assertEquals("100", connectionurl.getFailoverOption(ConnectionURL.OPTIONS_FAILOVER_CYCLE));
        assertTrue(connectionurl.getUsername().equals("ritchiem"));
        assertTrue(connectionurl.getPassword().equals("bob"));
        assertTrue(connectionurl.getVirtualHost().equals("/test"));

        assertTrue(connectionurl.getBrokerCount() == 2);

        BrokerDetails service = connectionurl.getBrokerDetails(0);

        assertTrue(service.getTransport().equals("tcp"));
        assertTrue(service.getHost().equals("localhost"));
        assertTrue(service.getPort() == 5672);

        service = connectionurl.getBrokerDetails(1);

        assertTrue(service.getTransport().equals("tcp"));
        assertTrue(service.getHost().equals("fancyserver"));
        assertTrue(service.getPort() == 3000);
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.