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

Roman Kalukiewicz commented on CAMEL-279:
-----------------------------------------

I agree on the fact, that DSL could modify some header, and there is nothing 
wrong about it. I just think, that in a case I presented in my comment it 
shouldn't.

the question is: what is the intended behavior of

{code}
beanRef("someBean", "fooMethod")
{code}

I think, that it is 'execute {{fooMethod()}} on {{someBean}} (and doesn't 
change current {{METHOD_NAME}} header)', while it is not 'execute 
{{fooMethod()}} and overwrite {{METHOD_NAME}} so all next invocations will 
execute {{fooMethod()}}'.

Maybe it is my misunderstanding of the concept, but I believe, that from 
external point of view {{BeanProcessor}} shouldn't change {{METHOD_NAME}} 
header.

I assume that internally it could change this header, but I can imagine a bean 
that tries to use [EMAIL PROTECTED](METHOD_NAME)}} annotation - should it be 
given it's own method name, or original value of {{METHOD_NAME}} header? I 
believe that the second answer is 'more' correct (but I'm not 100% convinced).

What I describe is only my thoughts - if we assume that it should work the way 
it does now, then let's document it and we are done. I just think, that it is 
not working in a way I would expect it to.


> BeanProcessor permanently sets METHOD_NAME header
> -------------------------------------------------
>
>                 Key: CAMEL-279
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-279
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Roman Kalukiewicz
>            Assignee: Willem Jiang
>             Fix For: 1.3.0
>
>         Attachments: bean-processor.patch
>
>
> Issue described here: 
> http://www.nabble.com/BeanProcessor-multiple-method-invocation-on-same-bean-to14506245s22882.html#a14506245

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

Reply via email to