Examples of BrokerFactoryBean


Examples of org.activemq.spring.BrokerFactoryBean

public class JcaFlowTransactionTest extends AbstractClusteredTransactionTest {

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

Examples of org.activemq.spring.BrokerFactoryBean

public class JcaFlowPersistentTest extends AbstractPersistenceTest {

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

Examples of org.activemq.spring.BrokerFactoryBean

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

Examples of org.apache.activemq.xbean.BrokerFactoryBean

    protected BrokerService broker;
    protected ActiveMQConnectionFactory connectionFactory;
    protected ActiveMQQueue queue;

    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

        container.init();
        container.start();
    }

    protected void createJmsBroker() throws Exception {
        BrokerFactoryBean bfb = new BrokerFactoryBean(new ClassPathResource("org/apache/servicemix/jms/activemq.xml"));
        bfb.afterPropertiesSet();
        broker = bfb.getBroker();
        configureJmsBroker();
        broker.start();
    }
View Full Code Here

Examples of org.apache.activemq.xbean.BrokerFactoryBean

        URI amqConfigUri = baseDir.resolve(amqConfigFile);
       
        ClassLoader old = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(classLoader);
        try {
            BrokerFactoryBean brokerFactory = new BrokerFactoryBean(
                    new FileSystemResource(new File(amqConfigUri)));
            //TODO There should be a better way to avoid the concurrent broker creations
            synchronized (BrokerServiceGBeanImpl.class) {
                System.setProperty("activemq.brokerName", brokerName);
                System.setProperty("activemq.home", new File(baseDir).toString());
                System.setProperty("activemq.data", new File(dataDir).toString());
               
                File geronimoHomeURL = serverInfo.resolveServer("./");
                System.setProperty("activemq.geronimo.home.url", geronimoHomeURL.toURI().toURL().toString());
                brokerFactory.afterPropertiesSet();               
            }
            brokerService = brokerFactory.getBroker();
//            brokerService = BrokerFactory.createBroker(new URI(brokerUri));
           
            // Do not allow creation of another ConnectorServer
            ManagementContext mgmtctx = new ManagementContext(mbeanServerReference != null ? mbeanServerReference.getMBeanServer() : null);
            mgmtctx.setCreateConnector(false);
View Full Code Here

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

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

Examples of org.apache.activemq.xbean.BrokerFactoryBean

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

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

Examples of org.apache.activemq.xbean.BrokerFactoryBean

        return result;
    }

    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
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.