Search in sources :

Example 6 with BrokerFactoryBean

use of org.apache.activemq.xbean.BrokerFactoryBean in project activemq-artemis by apache.

the class KahaQueueTest method createBroker.

@Override
protected BrokerService createBroker(String uri) throws Exception {
    Resource resource = new ClassPathResource(config);
    BrokerFactoryBean brokerFactory = new BrokerFactoryBean(resource);
    resource = new ClassPathResource(config);
    brokerFactory = new BrokerFactoryBean(resource);
    brokerFactory.afterPropertiesSet();
    return brokerFactory.getBroker();
}
Also used : BrokerFactoryBean(org.apache.activemq.xbean.BrokerFactoryBean) ClassPathResource(org.springframework.core.io.ClassPathResource) Resource(org.springframework.core.io.Resource) ClassPathResource(org.springframework.core.io.ClassPathResource)

Example 7 with BrokerFactoryBean

use of org.apache.activemq.xbean.BrokerFactoryBean in project activemq-artemis by apache.

the class TwoBrokerTopicSendReceiveUsingTcpTest method setUp.

@Override
protected void setUp() throws Exception {
    BrokerFactoryBean brokerFactory;
    brokerFactory = new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/usecases/receiver.xml"));
    brokerFactory.afterPropertiesSet();
    receiverBroker = brokerFactory.getBroker();
    brokerFactory = new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/usecases/sender.xml"));
    brokerFactory.afterPropertiesSet();
    senderBroker = brokerFactory.getBroker();
    super.setUp();
}
Also used : BrokerFactoryBean(org.apache.activemq.xbean.BrokerFactoryBean) ClassPathResource(org.springframework.core.io.ClassPathResource)

Example 8 with BrokerFactoryBean

use of org.apache.activemq.xbean.BrokerFactoryBean in project activemq-artemis by apache.

the class PublishOnQueueConsumedMessageUsingActivemqXMLTest method createBroker.

protected BrokerService createBroker(Resource resource) throws Exception {
    BrokerFactoryBean factory = new BrokerFactoryBean(resource);
    factory.afterPropertiesSet();
    BrokerService broker = factory.getBroker();
    return broker;
}
Also used : BrokerFactoryBean(org.apache.activemq.xbean.BrokerFactoryBean) BrokerService(org.apache.activemq.broker.BrokerService)

Example 9 with BrokerFactoryBean

use of org.apache.activemq.xbean.BrokerFactoryBean in project activemq-artemis by apache.

the class PublishOnTopicConsumerMessageUsingActivemqXMLTest method createBroker.

protected BrokerService createBroker(Resource resource) throws Exception {
    BrokerFactoryBean factory = new BrokerFactoryBean(resource);
    factory.afterPropertiesSet();
    BrokerService broker = factory.getBroker();
    return broker;
}
Also used : BrokerFactoryBean(org.apache.activemq.xbean.BrokerFactoryBean) BrokerService(org.apache.activemq.broker.BrokerService)

Example 10 with BrokerFactoryBean

use of org.apache.activemq.xbean.BrokerFactoryBean in project activemq-artemis by apache.

the class IndividualDeadLetterViaXmlTest method createBroker.

@Override
protected BrokerService createBroker() throws Exception {
    BrokerFactoryBean factory = new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/broker/policy/individual-dlq.xml"));
    factory.afterPropertiesSet();
    BrokerService answer = factory.getBroker();
    return answer;
}
Also used : BrokerFactoryBean(org.apache.activemq.xbean.BrokerFactoryBean) BrokerService(org.apache.activemq.broker.BrokerService) ClassPathResource(org.springframework.core.io.ClassPathResource)

Aggregations

BrokerFactoryBean (org.apache.activemq.xbean.BrokerFactoryBean)18 BrokerService (org.apache.activemq.broker.BrokerService)14 ClassPathResource (org.springframework.core.io.ClassPathResource)13 Resource (org.springframework.core.io.Resource)6 JMSException (javax.jms.JMSException)1 ActiveMQConnectionFactory (org.apache.activemq.ActiveMQConnectionFactory)1 ClassPathXmlApplicationContext (org.apache.xbean.spring.context.ClassPathXmlApplicationContext)1