Package org.apache.camel.spring

Examples of org.apache.camel.spring.SpringRouteBuilder


        return SpringCamelContext.springCamelContext(applicationContext);
    }

    @Override
    protected RouteBuilder createRouteBuilder() {
        return new SpringRouteBuilder() {
            public void configure() {
                from("direct:start").to("jpa://" + SendEmail.class.getName() + "?flushOnSend=true").to("mock:result");
            }
        };
    }
View Full Code Here


        return SpringCamelContext.springCamelContext(applicationContext);
    }

    @Override
    protected RouteBuilder createRouteBuilder() {
        return new SpringRouteBuilder() {
            public void configure() {
                from("direct:start").to("jpa://" + SendEmail.class.getName()).to("mock:result");
            }
        };
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    @Test
    public void testDuplicateMessagesAreFilteredOut() throws Exception {
        context.addRoutes(new SpringRouteBuilder() {
            @Override
            public void configure() throws Exception {
                // START SNIPPET: idempotent
                from("direct:start").idempotentConsumer(
                        header("messageId"),
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    @Test
    public void testFailedExchangesNotAdded() throws Exception {
        context.addRoutes(new SpringRouteBuilder() {
            @Override
            public void configure() throws Exception {
                errorHandler(deadLetterChannel("mock:error").maximumRedeliveries(0).redeliveryDelay(0).logStackTrace(false));

                from("direct:start").idempotentConsumer(
View Full Code Here

        return SpringCamelContext.springCamelContext(applicationContext);
    }

    @Override
    protected RouteBuilder createRouteBuilder() {
        return new SpringRouteBuilder() {
            public void configure() {
                from("direct:start").to("jpa://" + SendEmail.class.getName()).to("mock:result");
            }
        };
    }
View Full Code Here

        return SpringCamelContext.springCamelContext(applicationContext);
    }

    @Override
    protected RouteBuilder createRouteBuilder() {
        return new SpringRouteBuilder() {
            public void configure() {
                from("direct:start").to("jpa://" + SendEmail.class.getName());

                from("jpa://" + SendEmail.class.getName() + "?maximumResults=1&consumeDelete=false&delay=5000").to("mock:result");
            }
View Full Code Here

        assertEquals(true, out.getProperty(Exchange.FAILURE_HANDLED));
        assertEquals(false, out.getProperty(Exchange.ERRORHANDLER_HANDLED));
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                onException(IllegalArgumentException.class).maximumRedeliveries(3);

                // START SNIPPET: e1
                from("direct:okay")
View Full Code Here

    protected RouteBuilder createRouteBuilder() throws Exception {
        // START SNIPPET: e1
        // Notice that we use the SpringRouteBuilder that has a few more features than
        // the standard RouteBuilder
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // START SNIPPET: e1
                // lookup the transaction policy
                SpringTransactionPolicy required = lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);
View Full Code Here

    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        // Notice that we use the SpringRouteBuilder that has a few more features than
        // the standard RouteBuilder
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // setup the transaction policy
                SpringTransactionPolicy required = lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);

                // use transaction error handler
View Full Code Here

* @version
*/
public class TransactionalClientDataSourceWithTransactedErrorHandlerOnExceptionRedeliveryTest extends TransactionalClientDataSourceRedeliveryTest {

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // START SNIPPET: e1

                // configure transacted error handler to use up till 4 redeliveries
                // we have not passed in any spring TX manager. Camel will automatic
View Full Code Here

TOP

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

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.