You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Chris Pimlott (JIRA)" <ji...@apache.org> on 2015/07/23 01:38:04 UTC

[jira] [Updated] (CAMEL-9002) Headers set within velocity header are not saved when using custom VelocityContext

     [ https://issues.apache.org/jira/browse/CAMEL-9002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Pimlott updated CAMEL-9002:
---------------------------------
    Attachment: VelocityContextHeaderSetHeaderTest.java

> Headers set within velocity header are not saved when using custom VelocityContext
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-9002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9002
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.15.2
>            Reporter: Chris Pimlott
>         Attachments: VelocityContextHeaderSetHeaderTest.java
>
>
> Normally, any headers set within the velocity header are preserved as headers on the out message.  However, this does not work if you use your own VelocityContext via the CamelVelocityContext.  This is because VelocityEndpoint relies on the fact that the "headers" entry in the velocity context normally points directly to the current Exchange's in headers.  This is not likely true when using an existing velocity context.
> A more foolproof solution would be to explicitly copy any updated headers from the velocity context to the out message.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)