Package org.apache.servicemix.jbi.container

Examples of org.apache.servicemix.jbi.container.JBIContainer


        JdbcStoreFactory storeFactory = new JdbcStoreFactory();
        storeFactory.setDataSource(dataSource);
        storeFactory.setTransactional(true);
        store = storeFactory.open("store");
       
        jbi = new JBIContainer();
        jbi.setFlows(new Flow[] {new SedaFlow(), new JCAFlow(ACTIVEMQ_URL) });
        jbi.setEmbedded(true);
        jbi.setUseMBeanServer(false);
        jbi.setCreateMBeanServer(false);
        jbi.setTransactionManager(tm);
View Full Code Here


        jbi2.shutDown();
        broker.stop();
    }

    protected JBIContainer createContainer(String name) throws Exception {
        JBIContainer container = new JBIContainer();
        container.setName(name);
        container.setFlowName("jms?jmsURL=" + ACTIVEMQ_URL);
        container.setUseMBeanServer(false);
        container.setEmbedded(true);
        container.init();
        container.start();
        return container;
    }
View Full Code Here

        tm = new GeronimoPlatformTransactionManager();
        super.setUp();
    }

    protected JBIContainer createContainer(String name) throws Exception {
        JBIContainer container = new JBIContainer();
        container.setName(name);
        JCAFlow flow = new JCAFlow(ACTIVEMQ_URL);
        container.setTransactionManager(tm);
        container.setFlow(flow);
        container.setUseMBeanServer(false);
        container.setEmbedded(true);
        container.init();
        container.start();
        return container;
    }
View Full Code Here

    }
   
    public void test() throws Exception {
        JBIContainer[] containers = new JBIContainer[4];
        for (int i = 0; i < containers.length; i++) {
            containers[i] = new JBIContainer();
            containers[i].setName("container" + i);
            containers[i].setFlow(createFlow());
            containers[i].setEmbedded(true);
            containers[i].setMonitorInstallationDirectory(false);
            containers[i].setUseMBeanServer(false);
View Full Code Here

            container = null;
        }
    }

    private JBIContainer createContainer() throws GBeanNotFoundException {
        JBIContainer container = new JBIContainer();
        container.setUseShutdownHook(false);
        container.setName(name);
        container.setRootDir(directory);
        container.setUseMBeanServer(true);
        TransactionManager tm = getTransactionManager();
        container.setTransactionManager(tm);
        container.setMonitorInstallationDirectory(false);
        container.setMonitorDeploymentDirectory(false);
        return container;
    }
View Full Code Here

    private DefaultServiceMixClient client;
    private InOut io;
    private JBIContainer container;
   
    protected void setUp() throws Exception {
        container = new JBIContainer();
        container.setUseMBeanServer(false);
        container.setCreateMBeanServer(false);
        container.setMonitorInstallationDirectory(false);
        container.setNamingContext(new InitialContext());
        container.setEmbedded(true);
View Full Code Here

        System.setProperty(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getName());
        System.setProperty(Context.PROVIDER_URL, "vm://localhost");
    }

    protected void createJbiContainer() throws Exception {
        container = new JBIContainer();
        configureJbiContainer();
        container.init();
        container.start();
    }
View Full Code Here

            "HelloService");

    private JBIContainer jbi;

    protected void setUp() throws Exception {
        jbi = new JBIContainer();
        jbi.setEmbedded(true);
        jbi.init();
        jbi.start();

    }
View Full Code Here

import org.springframework.scheduling.quartz.SimpleTriggerBean;

public class QuartzComponentTest extends TestCase {

    public void test() throws Exception {
        JBIContainer jbi = new JBIContainer();
        jbi.setEmbedded(true);
        jbi.init();
       
        QuartzComponent quartz = new QuartzComponent();
        QuartzEndpoint endpoint = new QuartzEndpoint();
        endpoint.setService(new QName("quartz"));
        endpoint.setEndpoint("endpoint");
        endpoint.setTargetService(new QName("receiver"));
        SimpleTriggerBean trigger = new SimpleTriggerBean();
        trigger.setRepeatInterval(100);
        trigger.setName("trigger");
        trigger.afterPropertiesSet();
        endpoint.setTrigger(trigger);
        quartz.setEndpoints(new QuartzEndpoint[] {endpoint });
        jbi.activateComponent(quartz, "servicemix-quartz");
       
        ReceiverComponent receiver = new ReceiverComponent(new QName("receiver"), "endpoint");
        jbi.activateComponent(receiver, "receiver");
       
        jbi.start();

        Thread.sleep(1000);
        assertTrue(receiver.getMessageList().flushMessages().size() > 0);
       
        quartz.stop();
        Thread.sleep(1000);
        receiver.getMessageList().flushMessages();
        assertEquals(0, receiver.getMessageList().flushMessages().size());
       
        quartz.start();
        Thread.sleep(1000);
        assertTrue(receiver.getMessageList().flushMessages().size() > 0);

        jbi.shutDown();
    }
View Full Code Here

        jmsBroker = new BrokerService();
        jmsBroker.setPersistent(false);
        jmsBroker.addConnector("vm://localhost");
        jmsBroker.start();

        jbi = new JBIContainer();
        jbi.setEmbedded(true);
        jbi.init();
        jbi.start();

        wsnComponent = new WSNComponent();
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jbi.container.JBIContainer

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.