Package org.apache.camel

Examples of org.apache.camel.CamelContext.stop()


        CamelContext context = new DefaultCamelContext();
        context.addComponent("properties", new PropertiesComponent("sampleconfig.properties"));
        context.addRoutes(new OrderRouteBuilder());
        context.start();
        System.in.read();
        context.stop();
    }
   
    public static void main(String[] args) throws Exception {
        new Starter().run();
    }
View Full Code Here


        addJmsComponent(context);
        context.setTracing(true);
        context.addRoutes(new Jpa2JmsRoute());
        context.start();
        System.in.read();
        context.stop();
    }

    private void addJmsComponent(CamelContext context) {
        ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
        JmsConfiguration jmsConfig = new JmsConfiguration(cf);
View Full Code Here

        context.addComponent("jms", new JmsComponent(jmsConfig ));
        context.setTracing(true);
        context.addRoutes(new Jms2RestRoute());
        context.start();
        System.in.read();
        context.stop();
    }
   
    public static void main(String[] args) throws Exception {
        Jms2RestStarter starter = new Jms2RestStarter();
        starter.run();
View Full Code Here

        twitterComponent.setAccessTokenSecret("");
        context.setTracing(true);
        context.addRoutes(new VotingRoutes());
        context.start();
        System.in.read();
        context.stop();
    }
   
    public static void main(String[] args) throws Exception {
        VotingStarter starter = new VotingStarter();
        starter.run();
View Full Code Here

        assertEquals(camel2.getName(), listener.names.get(1));
        assertEquals(camel3.getName(), listener.names.get(2));

        camel1.stop();
        camel2.stop();
        camel3.stop();

        assertEquals(0, listener.names.size());
    }
}
View Full Code Here

                template.sendBodyAndHeaders("direct:in", payload, headers);
            }
            assertMockEndpointsSatisfied();
            return mock.getReceivedExchanges().get(0);
        } finally {
            context.stop();
        }
    }

    @Before
    public void setUp() throws Exception {
View Full Code Here

                template.sendBodyAndHeaders("direct:in", payload, headers);
            }
            assertMockEndpointsSatisfied();
            return mock.getReceivedExchanges().get(0);
        } finally {
            context.stop();
        }
    }

    @Before
    public void setUp() throws Exception {
View Full Code Here

                template.sendBodyAndHeaders("direct:in", payload, headers);
            }
            assertMockEndpointsSatisfied();
            return mock.getReceivedExchanges().get(0);
        } finally {
            context.stop();
        }
    }

    @Before
    public void setUp() throws Exception {
View Full Code Here

        AbstractApplicationContext applicationContext =
            new ClassPathXmlApplicationContext(new String[]{"/META-INF/spring/camelContext.xml"});
        CamelContext camelContext = applicationContext.getBean("camelContext", CamelContext.class);
        assertNotNull("The camel context should not be null", camelContext);
        Thread.sleep(2000);       
        camelContext.stop();
        applicationContext.stop();
    }

}
View Full Code Here

            System.out.println("Calling on port " + port);
            String out = myTemplate.requestBody("rmi://localhost:" + port + "/helloServiceBean", "Camel", String.class);
            assertEquals("Hello Camel", out);
        } finally {
            myTemplate.stop();
            myContext.stop();
        }
    }

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