Package org.apache.camel.spring

Examples of org.apache.camel.spring.Main.run()


    public void testStartupFailed() throws Exception {
        Main main = new Main();

        String[] args = new String[]{"-ac", "org/apache/camel/spring/issues/SpringMainStartFailedIssueTest.xml"};
        try {
            main.run(args);
            fail("Should have thrown an exception");
        } catch (Exception e) {
            assertIsInstanceOf(FailedToCreateRouteException.class, e.getCause());
        }
View Full Code Here


    public void testStartupFailed() throws Exception {
        Main main = new Main();

        String[] args = new String[]{"-ac", "org/apache/camel/spring/issues/SpringMainStartFailedIssueTest.xml"};
        try {
            main.run(args);
            fail("Should have thrown an exception");
        } catch (Exception e) {
            assertIsInstanceOf(FailedToCreateRouteException.class, e.getCause());
        }
View Full Code Here

    public static void main(String... args) throws Exception {
        // create a new main which will boot the Spring XML file
        Main main = new Main();
        main.setApplicationContext(new ClassPathXmlApplicationContext("META-INF/spring/webServiceCamelContext.xml"));
        main.enableHangupSupport();
        main.run();
    }

}
View Full Code Here

        // configure the location of the Spring XML file
        main.setApplicationContextUri("META-INF/spring/camel-context.xml");
        // enable hangup support allows Camel to detect when the JVM is terminated
        main.enableHangupSupport();
        // run and block until Camel is stopped (or JVM terminated)
        main.run();
    }
}
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.