Package org.apache.camel.spring

Examples of org.apache.camel.spring.Main


    /**
     * 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


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

* @version $Revision: 882492 $
*/
public class SpringMainStartFailedIssueTest extends TestSupport {

    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());
        }

        assertNull("Spring application context should NOT be created", main.getApplicationContext());
    }
View Full Code Here

    private static final transient Log LOG = LogFactory.getLog(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());
            assertEquals("Error creating bean with name 'camel': Invocation of init method failed;"
View Full Code Here

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

* @version
*/
public class SpringMainStartFailedIssueTest extends TestSupport {

    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());
        }

        assertNull("Spring application context should NOT be created", main.getApplicationContext());
    }
View Full Code Here

    private static final transient 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());
            assertTrue("Get a wrong exception name", e.getMessage().indexOf("nested exception is org.apache.camel.CamelException: "
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

    protected Main main;

    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

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

TOP

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

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.