Package org.apache.camel.spring

Examples of org.apache.camel.spring.Main$ParameterOption


     *
     * @param args
     * @throws Exception
     */
    public static void main(String[] args) throws Exception {
        new Main().run(args);
    }
View Full Code Here


    private static final Logger LOG = LoggerFactory.getLogger(MisspelledRouteRefTest.class);

    public void testApplicationContextFailed() {
        try {
            Main main = new Main();
            main.setApplicationContextUri("org/apache/camel/spring/issues/MisspelledRouteRefTest.xml");
            main.start();
            fail("Should have thrown an exception");
        } catch (Exception e) {
            //expected but want to see what it looks like...
            LOG.debug("Exception message : " + e.getMessage());
View Full Code Here

     * sent to the first one will be correctly transferred and consumed by the
     * other one.
     */
    @Test
    public void testJaxrsRelayRoute() throws Exception {
        final Main main = new Main();
        try {
            main.setApplicationContextUri("org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml");
            main.start();
            Thread t = new Thread(new Runnable() {
                /**
                 * Sends a request to the first endpoint in the route
                 */
                public void run() {
                    try {
                        JAXRSClientFactory.create("http://localhost:" + port6 + "/CxfRsRelayTest/rest", UploadService.class)
                            .upload(CamelRouteBuilder.class.getResourceAsStream(SAMPLE_CONTENT_PATH),
                                    SAMPLE_NAME);
                    } catch (Exception e) {
                        e.printStackTrace();
                        throw new RuntimeException(e);
                    }
                }
            });
            t.start();
            LATCH.await(10, TimeUnit.SECONDS);
            assertEquals(SAMPLE_NAME, name);
            StringWriter writer = new StringWriter();
            IOUtils.copyAndCloseInput(new InputStreamReader(CamelRouteBuilder.class
                                          .getResourceAsStream(SAMPLE_CONTENT_PATH)), writer);
            assertEquals(writer.toString(), content);
        } finally {
            main.stop();
        }
    }
View Full Code Here

     * Allow this route to be run as an application
     *
     * @param args
     */
    public static void main(String[] args) throws Exception{
        new Main().run(args);
    }
View Full Code Here

        url = "http://localhost:" + port + "/camel-example-cxf-proxy/webservices/incident";
    }

    protected void startCamel() throws Exception {
        if (!"true".equalsIgnoreCase(System.getProperty("skipStartingCamelContext"))) {
            main = new Main();
            main.setApplicationContextUri("META-INF/spring/camel-config.xml");
            main.start();
        } else {
            System.out.println("Skipping starting CamelContext as system property skipStartingCamelContext is set to be true.");
        }
View Full Code Here

    private LoanBroker() {
    }

    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

    /**
     * Allow this route to be run as an application
     */
    public static void main(String[] args) throws Exception {
        new Main().run(args);
    }
View Full Code Here

    /**
     * Allow this route to be run as an application
     */
    public static void main(String[] args) throws Exception {
        new Main().run(args);
    }
View Full Code Here

    private CamelConsoleMain() {
    }

    public static void main(String[] args) throws Exception {
        // Main makes it easier to run a Spring application
        Main main = new Main();
        // 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

        url = "http://localhost:" + port + "/camel-example-cxf-proxy/webservices/incident";
    }

    protected void startCamel() throws Exception {
        if (!"true".equalsIgnoreCase(System.getProperty("skipStartingCamelContext"))) {
            main = new Main();
            main.setApplicationContextUri("META-INF/spring/camel-config.xml");
            main.start();
        } else {
            System.out.println("Skipping starting CamelContext as system property skipStartingCamelContext is set to be true.");
        }
View Full Code Here

TOP

Related Classes of org.apache.camel.spring.Main$ParameterOption

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.