Search in sources :

Example 11 with BrokerFactoryBean

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

the class DestinationCursorConfigTest method createBroker.

protected BrokerService createBroker() throws Exception {
    BrokerFactoryBean factory = new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/broker/policy/cursor.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)

Example 12 with BrokerFactoryBean

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

the class JmsMultipleBrokersTestSupport method createBroker.

protected BrokerService createBroker(Resource configFile) throws Exception {
    BrokerFactoryBean brokerFactory = new BrokerFactoryBean(configFile);
    brokerFactory.afterPropertiesSet();
    BrokerService broker = brokerFactory.getBroker();
    brokers.put(broker.getBrokerName(), new BrokerItem(broker));
    return broker;
}
Also used : BrokerFactoryBean(org.apache.activemq.xbean.BrokerFactoryBean) BrokerService(org.apache.activemq.broker.BrokerService)

Example 13 with BrokerFactoryBean

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

the class NetworkFailoverTest method createBroker.

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

Example 14 with BrokerFactoryBean

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

the class QueueMasterSlaveTestSupport method createMaster.

protected void createMaster() throws Exception {
    BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(getMasterXml()));
    brokerFactory.afterPropertiesSet();
    master = brokerFactory.getBroker();
    master.start();
}
Also used : BrokerFactoryBean(org.apache.activemq.xbean.BrokerFactoryBean) ClassPathResource(org.springframework.core.io.ClassPathResource)

Example 15 with BrokerFactoryBean

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

the class QueueMasterSlaveTestSupport method createSlave.

protected void createSlave() throws Exception {
    BrokerFactoryBean brokerFactory = new BrokerFactoryBean(new ClassPathResource(getSlaveXml()));
    brokerFactory.afterPropertiesSet();
    BrokerService broker = brokerFactory.getBroker();
    broker.start();
    slave.set(broker);
    slaveStarted.countDown();
}
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