The constant is a constant, and only created every once.
Use a method call to create a new instance, such as:
.setHeader("foo", method(MyBean.class, "createNewList"))
And have a public method that create that new list you want.
On Wed, Dec 11, 2013 at 7:58 PM, horyna <[email protected]> wrote:
> Hi,
>
> using Camel 2.12
>
> i have a route with start:
> .setHeader(RESPONSE_LIST_KEY, constant(new
> ArrayList<ValidateProductActivationResponse>()))
>
> and inside adding some ValidateProductActivationResponse objects into the
> List.
>
> Problem is, that this header object (RESPONSE_LIST_KEY) is persist over
> requests. I know that the right solution is to reset RESPONSE_LIST_KEY in
> processor (on any dynamic way). But its mean the memory for data is global
> for a specific IP address, or how? If yes, multiple request from same IP
> address will overwrite the data?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Header-Property-stay-between-requests-tp5744628.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io