You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Raúl Kripalani (JIRA)" <ji...@apache.org> on 2014/09/10 15:44:28 UTC

[jira] [Resolved] (CAMEL-7798) Exchange formatter configured on Log Component may lead to incoherent results

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

Raúl Kripalani resolved CAMEL-7798.
-----------------------------------
    Resolution: Fixed

> Exchange formatter configured on Log Component may lead to incoherent results
> -----------------------------------------------------------------------------
>
>                 Key: CAMEL-7798
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7798
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.4, 2.13.2
>            Reporter: Raúl Kripalani
>            Assignee: Raúl Kripalani
>             Fix For: 2.12.5, 2.13.3, 2.14.0
>
>
> Currently configuring a custom ExchangeFormatter at the Log Component level may lead to incoherent results if there are multiple Log endpoints in the context, with different log options (e.g. showBody=true, showBody=false).
> This is because the component looks up the ExchangeFormatter in the registry, sets its properties and then *remembers* the result for the subsequent endpoint initialisations. This is incorrect.
> The correct procedure is:
> # Look up the ExchangeFormatter each time, obtaining a new fresh copy each time. This can be ensured by using @scope=prototype in Spring/Blueprint in the bean definition.
> # Set its properties, according to the current endpoint's properties.
> # Use the resulting ExchangeFormatter for that endpoint only.
> # Subsequent endpoint initialisations must repeat the same procedure.



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