Package org.apache.activemq.xbean

Examples of org.apache.activemq.xbean.BrokerFactoryBean


        return broker;
    }

    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;
    }
View Full Code Here


    protected BrokerService createBroker(String resource) throws Exception {
        return createBroker(new ClassPathResource(resource));
    }

    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);

        //Broker is already started by default when using the XML file
       // broker.start();
View Full Code Here

* @version $Revision$
*/
public class KahaLoadTester extends LoadTester  {

    protected BrokerService createBroker() throws Exception {
        BrokerFactoryBean brokerFactory=new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/broker/store/kahabroker.xml"));
        brokerFactory.afterPropertiesSet();
        BrokerService broker =  brokerFactory.getBroker();
        broker.setDeleteAllMessagesOnStartup(true);
        return broker;
    }
View Full Code Here

        remoteBroker.stop();
    }

    protected void doSetUp() throws Exception{
        Resource resource=new ClassPathResource(getRemoteBrokerURI());
        BrokerFactoryBean factory=new BrokerFactoryBean(resource);
        factory.afterPropertiesSet();
        remoteBroker=factory.getBroker();
        remoteBroker.start();
       
        resource=new ClassPathResource(getLocalBrokerURI());
        factory=new BrokerFactoryBean(resource);
        factory.afterPropertiesSet();
        localBroker=factory.getBroker();
       
        localBroker.start();
       
        URI localURI=localBroker.getVmConnectorURI();
        ActiveMQConnectionFactory fac=new ActiveMQConnectionFactory(localURI);
View Full Code Here

* @version $Revision: 426366 $
*/
public class MultipleTestsWithXBeanFactoryBeanTest extends MultipleTestsWithEmbeddedBrokerTest {

    protected BrokerService createBroker() throws Exception {
        BrokerFactoryBean factory = new BrokerFactoryBean();
        factory.setConfig(new ClassPathResource("org/apache/activemq/xbean/activemq2.xml"));
        factory.afterPropertiesSet();
        return factory.getBroker();
    }
View Full Code Here

*/
public class IndividualDeadLetterViaXmlTest extends DeadLetterTest {


    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;
    }
View Full Code Here

public class TwoBrokerTopicSendReceiveUsingTcpTest extends TwoBrokerTopicSendReceiveTest {
    private BrokerService receiverBroker;
    private BrokerService senderBroker;

    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();
    }
View Full Code Here

    protected BrokerService createBroker(String resource) throws Exception {
        return createBroker(new ClassPathResource(resource));
    }

    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;
View Full Code Here

    protected BrokerService createBroker(String resource) throws Exception {
        return createBroker(new ClassPathResource(resource));
    }

    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;
View Full Code Here

        if (brokerURI == null) {
            brokerURI = "activemq.xml";
        }
        context.log("Loading ActiveMQ Broker configuration from: " + brokerURI);
        Resource resource = new ServletContextResource(context, brokerURI);
        BrokerFactoryBean factory = new BrokerFactoryBean(resource);
        try {
            factory.afterPropertiesSet();
        }
        catch (Exception e) {
            context.log("Failed to create broker: " + e, e);
        }
        return factory.getBroker();
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.xbean.BrokerFactoryBean

Copyright © 2018 www.massapicom. 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.