camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CAMEL-2109) ID of route is not set when onException is used
Date Thu, 29 Oct 2009 11:42:52 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55067#action_55067
] 

Claus Ibsen edited comment on CAMEL-2109 at 10/29/09 4:42 AM:
--------------------------------------------------------------

The testcase did work fine at my system, but when i change the RouteBuilder to:
{code}

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
            	
            	onException(IllegalArgumentException.class).handled(true).to("log:bar").to("mock:error").end();
            	 
                from("activemq:queue:foo?transacted=true").id("myCoolRoute")
                    .transacted()
                    .choice()
                        .when(body().contains("Kabom")).throwException(new IllegalArgumentException("Damn"))
                    .otherwise()
                        .to("mock:result")
                    .end();

            }
        };
    }
{code}

then the test fails ....

-- added code snippets

      was (Author: dulmerlucsly):
    The testcase did work fine at my system, but when i change the RouteBuilder to:

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
            	
            	onException(IllegalArgumentException.class).handled(true).to("log:bar").to("mock:error").end();
            	 
                from("activemq:queue:foo?transacted=true").id("myCoolRoute")
                    .transacted()
                    .choice()
                        .when(body().contains("Kabom")).throwException(new IllegalArgumentException("Damn"))
                    .otherwise()
                        .to("mock:result")
                    .end();

            }
        };
    }

then the test fails ....
  
> ID of route is not set when onException is used
> -----------------------------------------------
>
>                 Key: CAMEL-2109
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2109
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>         Environment: Apache Camel 2.1-SNAPSHOT (build 20091022) , Java 1.6.0,  Linux

>            Reporter: Patrick Klippel
>            Assignee: Claus Ibsen
>
> When building a route like this:
> {code}
> ....
> public void configure() {
> from("jms:fileIn?transacted=true")
>   .onException(UnmarshalException.class)
>    .handled(true)
>     .bean(FileProcessExceptionBean.class,"handleException")
> .end()
> .id("fileMapping")
> .transacted()
> .process(new FileProcessor())
> .to("jms:fileOut");
> }
> {code}
> the id is not set. When the onException-section is removed, the id is set correctly

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message