You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/05/12 11:28:50 UTC

[jira] Created: (CAMEL-1606) Java RouteBuilder with blocks seems to not work correctly with end()

Java RouteBuilder with blocks seems to not work correctly with end()
--------------------------------------------------------------------

                 Key: CAMEL-1606
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1606
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.0-M1, 1.6.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 2.0.0


Working on the new DSL for onComplete, onFailure callbacks for Exchange when its done.

The route below is to define a subroute (the block with sycnhronize).

{code}
                from("direct:start")
                    .synchronize()
                        .to("mock:before")
                        .process(complete)
                        .to("mock:after")
                    .end()
                    .transform(constant("Bye World"))
                    .to("mock:result");
{code}

So the otuer route should be:
from -> sync -> transform -> mock:result

and sync sub route should be:
sync -> mock:before -> process -> mock:after

But with the current codebase the end() is not handling the block correctly.
It ends with the outer route being incl. the sub route:
from -> sync -> mock:before -> process -> mock:after -> transform -> mock:result

Spring DSL does not have this issue as it uses XML tags to indicate sub routes and where they start/end

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


[jira] Commented: (CAMEL-1606) Java RouteBuilder with blocks seems to not work correctly with end()

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51633#action_51633 ] 

Claus Ibsen commented on CAMEL-1606:
------------------------------------

Okay gotta it sorted. The other definitions that uses blocks handle the push/block/end by hand - for instance TryDefintion.

I guess this makes sense allowing your definition to be in full control how block should be applied.
Got it working now with synchronize

> Java RouteBuilder with blocks seems to not work correctly with end()
> --------------------------------------------------------------------
>
>                 Key: CAMEL-1606
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1606
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.0, 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>
> Working on the new DSL for onComplete, onFailure callbacks for Exchange when its done.
> The route below is to define a subroute (the block with sycnhronize).
> {code}
>                 from("direct:start")
>                     .synchronize()
>                         .to("mock:before")
>                         .process(complete)
>                         .to("mock:after")
>                     .end()
>                     .transform(constant("Bye World"))
>                     .to("mock:result");
> {code}
> So the otuer route should be:
> from -> sync -> transform -> mock:result
> and sync sub route should be:
> sync -> mock:before -> process -> mock:after
> But with the current codebase the end() is not handling the block correctly.
> It ends with the outer route being incl. the sub route:
> from -> sync -> mock:before -> process -> mock:after -> transform -> mock:result
> Spring DSL does not have this issue as it uses XML tags to indicate sub routes and where they start/end

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


[jira] Resolved: (CAMEL-1606) Java RouteBuilder with blocks seems to not work correctly with end()

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1606.
--------------------------------

    Resolution: Won't Fix

Block handling for each processor using them must handle it specially as such.

> Java RouteBuilder with blocks seems to not work correctly with end()
> --------------------------------------------------------------------
>
>                 Key: CAMEL-1606
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1606
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.0, 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>
> Working on the new DSL for onComplete, onFailure callbacks for Exchange when its done.
> The route below is to define a subroute (the block with sycnhronize).
> {code}
>                 from("direct:start")
>                     .synchronize()
>                         .to("mock:before")
>                         .process(complete)
>                         .to("mock:after")
>                     .end()
>                     .transform(constant("Bye World"))
>                     .to("mock:result");
> {code}
> So the otuer route should be:
> from -> sync -> transform -> mock:result
> and sync sub route should be:
> sync -> mock:before -> process -> mock:after
> But with the current codebase the end() is not handling the block correctly.
> It ends with the outer route being incl. the sub route:
> from -> sync -> mock:before -> process -> mock:after -> transform -> mock:result
> Spring DSL does not have this issue as it uses XML tags to indicate sub routes and where they start/end

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