Package org.apache.servicemix.jbi.container

Examples of org.apache.servicemix.jbi.container.JBIContainer.start()


       
        ActivationSpec spec = new ActivationSpec("component1", new ReceiverComponent());
        spec.setService(new QName("urn:test", "service1"));
        container.activateComponent(spec);
       
        container.start();
       
        final AtomicInteger canceled = new AtomicInteger();
       
        // injecting mock delivery channels to check if pending exchanges get canceled
        for (ComponentMBeanImpl mbean : container.getRegistry().getComponents()) {
View Full Code Here


   
    public void testExternalRouting() throws Exception {
        JBIContainer container = new JBIContainer();
        container.setEmbedded(true);
        container.init();
        container.start();
        ReceiverComponent receiver = new ReceiverComponent() {
            protected void init() throws JBIException {
                ServiceEndpoint ep = new TestExternalEndpoint(getService(), getEndpoint());
                getContext().registerExternalEndpoint(ep);
                setService(null);
View Full Code Here

            if (subscriptionFlowName != null) {
                container.getDefaultBroker().getSubscriptionManager().setFlowName(subscriptionFlowName);
            }
            container.setEmbedded(true);
      container.init();
      container.start();
     
      Sender sender = new SenderComponent();
            ActivationSpec senderActivationSpec = new ActivationSpec("sender", sender);
            senderActivationSpec.setFailIfNoDestinationEndpoint(false);
            container.activateComponent(senderActivationSpec);
View Full Code Here

        container.setName(name);
        container.setFlow(createFlow());
        container.setAutoEnlistInTransaction(true);
        container.setEmbedded(true);
        container.init();
        container.start();
        return container;
    }
   
    protected abstract Flow createFlow();
   
View Full Code Here

        jbi.activateComponent(quartz, "servicemix-quartz");
       
        ReceiverComponent receiver = new ReceiverComponent(new QName("receiver"), "endpoint");
        jbi.activateComponent(receiver, "receiver");
       
        jbi.start();

        Thread.sleep(200);
        assertTrue(receiver.getMessageList().flushMessages().size() > 0);
       
        quartz.stop();
View Full Code Here

        container.setName(name);
        container.setFlow(createFlow());
        container.setPersistent(true);
        container.setMonitorInstallationDirectory(false);
        container.init();
        container.start();
        return container;
    }

    protected void runSimpleTest(final boolean syncSend, final boolean syncReceive) throws Exception {
        // final int numMessages = 1;
View Full Code Here

    public void testResolveEPR() throws Exception {
        JBIContainer container = new JBIContainer();
        container.setEmbedded(true);
        container.init();
        container.start();
       
        EchoComponent component = new EchoComponent();
        container.activateComponent(component, "component");
        ServiceEndpoint ep = component.getContext().activateEndpoint(new QName("http://foo.bar.com", "myService"), "myEndpoint");
        DocumentFragment epr = ep.getAsReference(null);
View Full Code Here

      }
            // TODO: check why the following line is enabled, there is
            // a 5 seconds pause when Management stuff is initialized
      //container.setCreateMBeanServer(true);
      container.init();
      container.start();
     
      SenderListener sender = new SenderListener();
            ActivationSpec senderActivationSpec = new ActivationSpec("sender", sender);
            senderActivationSpec.setFailIfNoDestinationEndpoint(false);
      container.activateComponent(senderActivationSpec);
View Full Code Here

        container.setName(name);
        container.setFlowName("jms?jmsURL=tcp://localhost:61616");
        container.setUseMBeanServer(false);
        container.setEmbedded(true);
        container.init();
        container.start();
        return container;
    }
   
    protected StatelessEcho activateProvider(JBIContainer container, boolean stateless) throws Exception {
        StatelessEcho echo = new StatelessEcho(stateless);
View Full Code Here

        container.setTransactionManager(tm);
        container.setFlow(flow);
        container.setUseMBeanServer(false);
        container.setEmbedded(true);
        container.init();
        container.start();
        return container;
    }
   

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