Examples of BrokerFactoryBean


Examples of org.apache.activemq.xbean.BrokerFactoryBean

    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

Examples of org.apache.activemq.xbean.BrokerFactoryBean

    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

Examples of org.apache.activemq.xbean.BrokerFactoryBean

        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

Examples of org.apache.activemq.xbean.BrokerFactoryBean

    protected String uriString="failover://(tcp://localhost:62001,tcp://localhost:62002)?randomize=false";

    protected void setUp() throws Exception{
        failureCount = super.messageCount/2;
        super.topic = isTopic();
        BrokerFactoryBean brokerFactory=new BrokerFactoryBean(new ClassPathResource(getMasterXml()));
        brokerFactory.afterPropertiesSet();
        master=brokerFactory.getBroker();
        brokerFactory=new BrokerFactoryBean(new ClassPathResource(getSlaveXml()));
        brokerFactory.afterPropertiesSet();
        slave=brokerFactory.getBroker();
        master.start();
        slave.start();
        // wait for thing to connect
        Thread.sleep(1000);
        super.setUp();
View Full Code Here

Examples of org.apache.activemq.xbean.BrokerFactoryBean

        return new SlowConsumer(fac,dest);
    }
   
    protected BrokerService createBroker() throws Exception{
        Resource resource=new ClassPathResource("org/apache/activemq/perf/slowConsumerBroker.xml");
        BrokerFactoryBean factory=new BrokerFactoryBean(resource);
        factory.afterPropertiesSet();
        BrokerService broker =factory.getBroker();
        broker.start();
        return broker;
    }
View Full Code Here

Examples of org.apache.activemq.xbean.BrokerFactoryBean

public class MultipleJMSFlowTest extends TestCase {

    protected BrokerService broker;
   
    protected void setUp() throws Exception {
        BrokerFactoryBean bfb = new BrokerFactoryBean(new ClassPathResource("org/apache/servicemix/jbi/nmr/flow/jca/broker.xml"));
        bfb.afterPropertiesSet();
        broker = bfb.getBroker();
        broker.start();
        super.setUp();
    }
View Full Code Here

Examples of org.apache.activemq.xbean.BrokerFactoryBean

public class JcaFlowTransactionTest extends AbstractClusteredTransactionTest {

  protected BrokerService broker;
   
    protected void setUp() throws Exception {
        BrokerFactoryBean bfb = new BrokerFactoryBean(new ClassPathResource("org/apache/servicemix/jbi/nmr/flow/jca/broker.xml"));
        bfb.afterPropertiesSet();
        broker = bfb.getBroker();
        super.setUp();
    }
View Full Code Here

Examples of org.apache.activemq.xbean.BrokerFactoryBean

    protected JBIContainer container;
    protected BrokerService broker;
    protected ActiveMQConnectionFactory connectionFactory;

    protected void setUp() throws Exception {
        BrokerFactoryBean bfb = new BrokerFactoryBean(new ClassPathResource("org/apache/servicemix/jms/activemq.xml"));
        bfb.afterPropertiesSet();
        broker = bfb.getBroker();
        broker.start();

        container = new JBIContainer();
        container.setUseMBeanServer(true);
        container.setCreateMBeanServer(true);
View Full Code Here

Examples of org.apache.activemq.xbean.BrokerFactoryBean

        gtmfb.setTransactionContextManager(tcm);
        gtmfb.afterPropertiesSet();
        TransactionManager tm = (TransactionManager) gtmfb.getObject();
        tt = new TransactionTemplate(new JtaTransactionManager((UserTransaction) tm));
      
        BrokerFactoryBean bfb = new BrokerFactoryBean(new ClassPathResource("org/apache/servicemix/jbi/nmr/flow/jca/broker.xml"));
        bfb.afterPropertiesSet();
        broker = bfb.getBroker();
        broker.start();
       
        JCAFlow senderFlow = new JCAFlow();
        senderFlow.setJmsURL("tcp://localhost:61216");
        senderFlow.setTransactionContextManager(tcm);
View Full Code Here

Examples of org.apache.activemq.xbean.BrokerFactoryBean

public class JcaFlowPersistentTest extends AbstractPersistenceTest {

  protected BrokerService broker;
   
    protected void setUp() throws Exception {
        BrokerFactoryBean bfb = new BrokerFactoryBean(new ClassPathResource("org/apache/servicemix/jbi/nmr/flow/jca/broker.xml"));
        bfb.afterPropertiesSet();
        broker = bfb.getBroker();
        broker.start();
        super.setUp();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.