camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Error on Tracer HTML page
Date Mon, 18 Mar 2013 17:04:42 GMT
On Mon, Mar 18, 2013 at 4:56 PM, ronald.rockwell@envisagesystem
<ronald.rockwell@envisagesystems.com> wrote:
> The doc on the Tracer page needs to be updated. In the section "Using
> Destination for custom processing and routing", it states that "the original
> Exchange can be accessed using getTracedExchange()". This does not work and
> according to this
> http://camel.465427.n5.nabble.com/svn-commit-r791077-in-camel-trunk-camel-core-src-main-java-org-apache-camel-camel-core-src-main-java-td507632.html,
> hasn't worked since 2009.
>
> Apparently, the TraceEventExchange object has been gotten rid of.
>
> Access in your custom trace processor is via:
> public void process(Exchange exchange) throws Exception {
>                 // get the real exchange
>                 java.util.concurrent.ConcurrentHashMap hm = (ConcurrentHashMap)
> exchange.getProperties();
>                 Exchange ex = (Exchange) hm.get(Exchange.TRACE_EVENT_EXCHANGE);
>
>

It depends on the implementation, if you read the javadoc of the method

    /**
     * Gets the traced {@link Exchange}.
     * <p/>
     * Not all implementations may provide direct access to the traced
{@link Exchange} and thus this
     * method may return <tt>null</tt>. For example the JPA
implementation will return <tt>null</tt>.
     *
     * @return the traced {@link Exchange}, however it can be
<tt>null</tt> in some implementations.
     */
    Exchange getTracedExchange();



>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Error-on-Tracer-HTML-page-tp5729357.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message