You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Javier Arias (JIRA)" <ji...@apache.org> on 2011/05/02 14:56:03 UTC

[jira] [Created] (CAMEL-3928) custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split

custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split
--------------------------------------------------------------------------------------

                 Key: CAMEL-3928
                 URL: https://issues.apache.org/jira/browse/CAMEL-3928
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.7.1, 2.7.0, 2.6.0, 2.5.0, 2.4.0, 2.3.0, 2.2.0
         Environment: ubuntu 10.04
java version "1.6.0_22"
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
            Reporter: Javier Arias


In routes with a split step, when my wrapProcessorInInterceptors method is called, the  ProcessorDefinition<?> paremeter is referencing the Split definition instead of steps inside it.

For example, for the route:

from("direct:a").routeId("route:a")
        .split(xpath("//a/b")).id("task:split.products")
            .log("*** splited ::: body : ${body} ").id("task:handle.that") (*)
            .setHeader("insplit",constant("in-split")) (*)
        .end()
        .log("* aftersplit ::: body : ${body}").id("task:after.split");

for steps inside the split (*) the ProcessorDefinition is referencing the splitdefinition, while i think it should point to the log and setHeader steps.

It can be easily fixed,  in class:::

org.apache.camel.processor.DefaultChannel

in the method initChannel, changing

target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), outputDefinition, target, next);

by this:

target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), traceDef, target, next);



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-3928) custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split

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

Claus Ibsen resolved CAMEL-3928.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.8.0

Javier thanks for reporting. I have fixed this on trunk, and added unit test as well.

> custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3928
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3928
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1
>         Environment: ubuntu 10.04
> java version "1.6.0_22"
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
>            Reporter: Javier Arias
>            Assignee: Claus Ibsen
>             Fix For: 2.8.0
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> In routes with a split step, when my wrapProcessorInInterceptors method is called, the  ProcessorDefinition<?> paremeter is referencing the Split definition instead of steps inside it.
> For example, for the route:
> from("direct:a").routeId("route:a")
>         .split(xpath("//a/b")).id("task:split.products")
>             .log("*** splited ::: body : ${body} ").id("task:handle.that") (*)
>             .setHeader("insplit",constant("in-split")) (*)
>         .end()
>         .log("* aftersplit ::: body : ${body}").id("task:after.split");
> for steps inside the split (*) the ProcessorDefinition is referencing the splitdefinition, while i think it should point to the log and setHeader steps.
> It can be easily fixed,  in class:::
> org.apache.camel.processor.DefaultChannel
> in the method initChannel, changing
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), outputDefinition, target, next);
> by this:
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), traceDef, target, next);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-3928) custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split

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

Claus Ibsen reassigned CAMEL-3928:
----------------------------------

    Assignee: Claus Ibsen  (was: Hadrian Zbarcea)

> custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3928
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3928
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1
>         Environment: ubuntu 10.04
> java version "1.6.0_22"
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
>            Reporter: Javier Arias
>            Assignee: Claus Ibsen
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> In routes with a split step, when my wrapProcessorInInterceptors method is called, the  ProcessorDefinition<?> paremeter is referencing the Split definition instead of steps inside it.
> For example, for the route:
> from("direct:a").routeId("route:a")
>         .split(xpath("//a/b")).id("task:split.products")
>             .log("*** splited ::: body : ${body} ").id("task:handle.that") (*)
>             .setHeader("insplit",constant("in-split")) (*)
>         .end()
>         .log("* aftersplit ::: body : ${body}").id("task:after.split");
> for steps inside the split (*) the ProcessorDefinition is referencing the splitdefinition, while i think it should point to the log and setHeader steps.
> It can be easily fixed,  in class:::
> org.apache.camel.processor.DefaultChannel
> in the method initChannel, changing
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), outputDefinition, target, next);
> by this:
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), traceDef, target, next);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-3928) custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split

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

Hadrian Zbarcea reassigned CAMEL-3928:
--------------------------------------

    Assignee: Hadrian Zbarcea

> custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3928
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3928
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1
>         Environment: ubuntu 10.04
> java version "1.6.0_22"
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
>            Reporter: Javier Arias
>            Assignee: Hadrian Zbarcea
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> In routes with a split step, when my wrapProcessorInInterceptors method is called, the  ProcessorDefinition<?> paremeter is referencing the Split definition instead of steps inside it.
> For example, for the route:
> from("direct:a").routeId("route:a")
>         .split(xpath("//a/b")).id("task:split.products")
>             .log("*** splited ::: body : ${body} ").id("task:handle.that") (*)
>             .setHeader("insplit",constant("in-split")) (*)
>         .end()
>         .log("* aftersplit ::: body : ${body}").id("task:after.split");
> for steps inside the split (*) the ProcessorDefinition is referencing the splitdefinition, while i think it should point to the log and setHeader steps.
> It can be easily fixed,  in class:::
> org.apache.camel.processor.DefaultChannel
> in the method initChannel, changing
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), outputDefinition, target, next);
> by this:
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), traceDef, target, next);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3928) custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split

Posted by "Javier Arias (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027706#comment-13027706 ] 

Javier Arias commented on CAMEL-3928:
-------------------------------------

Hadrian,
I were referring to the solution provided, sorry but I wouldn't know how to
correctly write such a test...
Thank you.
Javier.

2011/5/2 Hadrian Zbarcea (JIRA) <ji...@apache.org>



> custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3928
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3928
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1
>         Environment: ubuntu 10.04
> java version "1.6.0_22"
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
>            Reporter: Javier Arias
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> In routes with a split step, when my wrapProcessorInInterceptors method is called, the  ProcessorDefinition<?> paremeter is referencing the Split definition instead of steps inside it.
> For example, for the route:
> from("direct:a").routeId("route:a")
>         .split(xpath("//a/b")).id("task:split.products")
>             .log("*** splited ::: body : ${body} ").id("task:handle.that") (*)
>             .setHeader("insplit",constant("in-split")) (*)
>         .end()
>         .log("* aftersplit ::: body : ${body}").id("task:after.split");
> for steps inside the split (*) the ProcessorDefinition is referencing the splitdefinition, while i think it should point to the log and setHeader steps.
> It can be easily fixed,  in class:::
> org.apache.camel.processor.DefaultChannel
> in the method initChannel, changing
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), outputDefinition, target, next);
> by this:
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), traceDef, target, next);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3928) custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027708#comment-13027708 ] 

Hadrian Zbarcea commented on CAMEL-3928:
----------------------------------------

@Javier, thanks for the clarification. No worries then. We appreciate unit tests whenever contributors provide them, otherwise, we have to write them ourselves to prevent the issue from popping up again in a future release. I will assign this to me and provide a unit test. It doesn't make your contribution any less important. Thanks again.

> custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3928
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3928
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1
>         Environment: ubuntu 10.04
> java version "1.6.0_22"
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
>            Reporter: Javier Arias
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> In routes with a split step, when my wrapProcessorInInterceptors method is called, the  ProcessorDefinition<?> paremeter is referencing the Split definition instead of steps inside it.
> For example, for the route:
> from("direct:a").routeId("route:a")
>         .split(xpath("//a/b")).id("task:split.products")
>             .log("*** splited ::: body : ${body} ").id("task:handle.that") (*)
>             .setHeader("insplit",constant("in-split")) (*)
>         .end()
>         .log("* aftersplit ::: body : ${body}").id("task:after.split");
> for steps inside the split (*) the ProcessorDefinition is referencing the splitdefinition, while i think it should point to the log and setHeader steps.
> It can be easily fixed,  in class:::
> org.apache.camel.processor.DefaultChannel
> in the method initChannel, changing
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), outputDefinition, target, next);
> by this:
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), traceDef, target, next);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3928) custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split

Posted by "Javier Arias (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027711#comment-13027711 ] 

Javier Arias commented on CAMEL-3928:
-------------------------------------

Thank you Hadrian,
may I have a look at your tests when you are done? this way I will learn for
next time.
Regards.

2011/5/2 Hadrian Zbarcea (JIRA) <ji...@apache.org>



> custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3928
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3928
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1
>         Environment: ubuntu 10.04
> java version "1.6.0_22"
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
>            Reporter: Javier Arias
>            Assignee: Hadrian Zbarcea
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> In routes with a split step, when my wrapProcessorInInterceptors method is called, the  ProcessorDefinition<?> paremeter is referencing the Split definition instead of steps inside it.
> For example, for the route:
> from("direct:a").routeId("route:a")
>         .split(xpath("//a/b")).id("task:split.products")
>             .log("*** splited ::: body : ${body} ").id("task:handle.that") (*)
>             .setHeader("insplit",constant("in-split")) (*)
>         .end()
>         .log("* aftersplit ::: body : ${body}").id("task:after.split");
> for steps inside the split (*) the ProcessorDefinition is referencing the splitdefinition, while i think it should point to the log and setHeader steps.
> It can be easily fixed,  in class:::
> org.apache.camel.processor.DefaultChannel
> in the method initChannel, changing
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), outputDefinition, target, next);
> by this:
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), traceDef, target, next);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-3928) custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027694#comment-13027694 ] 

Hadrian Zbarcea commented on CAMEL-3928:
----------------------------------------

@Javier, thanks for noticing this and for providing a fix!
You checked the patch available box. Do you intend to provide a patch with a unit test as well, or you were referring to the solution you provided in the description? A unit test would be fantastic.

> custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3928
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3928
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1
>         Environment: ubuntu 10.04
> java version "1.6.0_22"
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
>            Reporter: Javier Arias
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> In routes with a split step, when my wrapProcessorInInterceptors method is called, the  ProcessorDefinition<?> paremeter is referencing the Split definition instead of steps inside it.
> For example, for the route:
> from("direct:a").routeId("route:a")
>         .split(xpath("//a/b")).id("task:split.products")
>             .log("*** splited ::: body : ${body} ").id("task:handle.that") (*)
>             .setHeader("insplit",constant("in-split")) (*)
>         .end()
>         .log("* aftersplit ::: body : ${body}").id("task:after.split");
> for steps inside the split (*) the ProcessorDefinition is referencing the splitdefinition, while i think it should point to the log and setHeader steps.
> It can be easily fixed,  in class:::
> org.apache.camel.processor.DefaultChannel
> in the method initChannel, changing
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), outputDefinition, target, next);
> by this:
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), traceDef, target, next);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3928) custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split

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

Hadrian Zbarcea updated CAMEL-3928:
-----------------------------------

    Fix Version/s: 2.7.3

> custom interceptor - wrapProcessorInInterceptors - passing parent Description on Split
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3928
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3928
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1
>         Environment: ubuntu 10.04
> java version "1.6.0_22"
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
>            Reporter: Javier Arias
>            Assignee: Claus Ibsen
>             Fix For: 2.7.3, 2.8.0
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> In routes with a split step, when my wrapProcessorInInterceptors method is called, the  ProcessorDefinition<?> paremeter is referencing the Split definition instead of steps inside it.
> For example, for the route:
> from("direct:a").routeId("route:a")
>         .split(xpath("//a/b")).id("task:split.products")
>             .log("*** splited ::: body : ${body} ").id("task:handle.that") (*)
>             .setHeader("insplit",constant("in-split")) (*)
>         .end()
>         .log("* aftersplit ::: body : ${body}").id("task:after.split");
> for steps inside the split (*) the ProcessorDefinition is referencing the splitdefinition, while i think it should point to the log and setHeader steps.
> It can be easily fixed,  in class:::
> org.apache.camel.processor.DefaultChannel
> in the method initChannel, changing
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), outputDefinition, target, next);
> by this:
> target = strategy.wrapProcessorInInterceptors(routeContext.getCamelContext(), traceDef, target, next);

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira