use of org.apache.activemq.xbean.BrokerFactoryBean in project activemq-artemis by apache.
the class TwoBrokerTopicSendReceiveTest method createConnectionFactory.
protected ActiveMQConnectionFactory createConnectionFactory(String config, String brokerName, String connectUrl) throws JMSException {
try {
BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(config));
brokerFactory.afterPropertiesSet();
BrokerService broker = brokerFactory.getBroker();
brokers.put(brokerName, broker);
return new ActiveMQConnectionFactory(connectUrl);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
use of org.apache.activemq.xbean.BrokerFactoryBean in project activemq-artemis by apache.
the class ConfigTest method createBroker.
protected BrokerService createBroker(Resource resource) throws Exception {
BrokerFactoryBean factory = new BrokerFactoryBean(resource);
factory.afterPropertiesSet();
BrokerService broker = factory.getBroker();
assertTrue("Should have a broker!", broker != null);
return broker;
}
use of org.apache.activemq.xbean.BrokerFactoryBean in project activemq-artemis by apache.
the class SlowConsumerTopicTest method createBroker.
@Override
protected BrokerService createBroker(String url) throws Exception {
Resource resource = new ClassPathResource("org/apache/activemq/perf/slowConsumerBroker.xml");
System.err.println("CREATE BROKER FROM " + resource);
BrokerFactoryBean factory = new BrokerFactoryBean(resource);
factory.afterPropertiesSet();
BrokerService broker = factory.getBroker();
broker.start();
return broker;
}
Aggregations