You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "ronald.rockwell@envisagesystem" <ro...@envisagesystems.com> on 2013/03/18 16:56:49 UTC

Error on Tracer HTML page

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);



--
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.

Re: Error on Tracer HTML page

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Mar 18, 2013 at 4:56 PM, ronald.rockwell@envisagesystem
<ro...@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