[
https://issues.apache.org/activemq/browse/CAMEL-688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44153#action_44153
]
Claus Ibsen commented on CAMEL-688:
-----------------------------------
I found a side effect for this patch.
I do think the code should be like this:
{code}
if (value != null) {
if (exchange.getPattern().isOutCapable()) {
// force out creating if not already created (as its lazy)
if (LOG.isDebugEnabled()) {
LOG.debug("Setting bean invocation value on OUT
message: " + value);
}
exchange.getOut(true).setBody(value);
} else {
// if not out then set it on the in
if (LOG.isDebugEnabled()) {
LOG.debug("Setting bean invocation value on IN message:
" + value);
}
exchange.getIn().setBody(value);
}
{code}
Before in some situations the bean invocation value was never set, as this
route demonstrates:
{code}
from("direct:in").
to("bean:myBean").
setHeader(FileComponent.HEADER_FILE_NAME, "hello.txt").
to("file://target");
{code}
> process method of should check ExchnagePAttern before setting out
> -----------------------------------------------------------------
>
> Key: CAMEL-688
> URL: https://issues.apache.org/activemq/browse/CAMEL-688
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 1.3.0, 1.4.0
> Reporter: Freeman Fang
> Assignee: Willem Jiang
> Fix For: 1.4.0
>
> Attachments: CAMEL-688.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.