Search in sources :

Example 1 with QpidJmsClientProvider

use of org.apache.qpid.systests.QpidJmsClientProvider in project qpid-broker-j by apache.

the class HttpTestBase method setUpTestBase.

@Before
public void setUpTestBase() throws Exception {
    System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
    HttpRequestConfig config = getHttpRequestConfig();
    _helper = new HttpTestHelper(getBrokerAdmin(), config != null && config.useVirtualHostAsHost() ? getVirtualHost() : null);
    Protocol protocol = getProtocol();
    AmqpManagementFacade managementFacade = new AmqpManagementFacade(protocol);
    if (protocol == Protocol.AMQP_1_0) {
        _jmsProvider = new QpidJmsClientProvider(managementFacade);
    } else {
        _jmsProvider = new QpidJmsClient0xProvider();
    }
}
Also used : QpidJmsClient0xProvider(org.apache.qpid.systests.QpidJmsClient0xProvider) QpidJmsClientProvider(org.apache.qpid.systests.QpidJmsClientProvider) AmqpManagementFacade(org.apache.qpid.systests.AmqpManagementFacade) Protocol(org.apache.qpid.server.model.Protocol) Before(org.junit.Before)

Example 2 with QpidJmsClientProvider

use of org.apache.qpid.systests.QpidJmsClientProvider in project qpid-broker-j by apache.

the class QpidBrokerTestCase method runBare.

@Override
public void runBare() throws Throwable {
    try {
        _managementFacade = new AmqpManagementFacade(BROKER_PROTOCOL);
        _jmsProvider = isBroker10() ? new QpidJmsClientProvider(_managementFacade) : new QpidJmsClient0xProvider();
        _defaultBroker = new BrokerHolderFactory().create(DEFAULT_BROKER_TYPE, DEFAULT_PORT, this);
        super.runBare();
    } catch (Exception e) {
        LOGGER.error("exception", e);
        throw e;
    } finally {
        stopAllBrokers();
        // reset properties used in the test
        revertSystemProperties();
        LOGGER.info("==========  stop " + getTestName() + " ==========");
    }
}
Also used : QpidJmsClient0xProvider(org.apache.qpid.systests.QpidJmsClient0xProvider) QpidJmsClientProvider(org.apache.qpid.systests.QpidJmsClientProvider) AmqpManagementFacade(org.apache.qpid.systests.AmqpManagementFacade) URISyntaxException(java.net.URISyntaxException) NamingException(javax.naming.NamingException) JMSException(javax.jms.JMSException)

Aggregations

AmqpManagementFacade (org.apache.qpid.systests.AmqpManagementFacade)2 QpidJmsClient0xProvider (org.apache.qpid.systests.QpidJmsClient0xProvider)2 QpidJmsClientProvider (org.apache.qpid.systests.QpidJmsClientProvider)2 URISyntaxException (java.net.URISyntaxException)1 JMSException (javax.jms.JMSException)1 NamingException (javax.naming.NamingException)1 Protocol (org.apache.qpid.server.model.Protocol)1 Before (org.junit.Before)1