Hi

Please use the @user mailing list for your Camel questions as we say here
http://camel.apache.org/mailing-lists.html


On Mon, Feb 11, 2013 at 11:06 AM, BAnanth <bhavani.ana...@wipro.com> wrote:
> Hi,
>
> This is regarding the tracer functionality in camel.
> We want to persist the trace information in derby database. We also want to
> persist exception if any in the derby DB
> As per the documentation, the latter can be accomplished by setting
> traceExceptions = true;
>
> But even after setting trace exception to true, the exceptions are not
> getting logged.
>
> Upon closer examination, in TracerInterceptor.java  we have the following
> catch block, wherein we are logging the exception , but not persisting the
> same in DB.
>
> public boolean process(final Exchange exchange, final AsyncCallback
> callback) {
> ......
> ........
> try{
>         .....
>         ......
>          public void done(boolean doneSync) {
>                     try {
>                       } catch (Throwable e) {
>                         // some exception occurred in trace logic
>                         if (shouldLogException(exchange)) {
>                             logException(exchange, e);
>                         }
>                         exchange.setException(e);
>                     } finally {
>                         // ensure callback is always invoked
>                         callback.done(doneSync);
>                     }
>                 }
>             });
>
>
> }catch (Throwable e) {
>             // some exception occurred in trace logic
>             if (shouldLogException(exchange)) {
>                 logException(exchange, e);
>             }
>             exchange.setException(e);
>         }
>
> This could be rectified by calling the traceExchange(exchange) method in the
> finally block. Please do let us know if we are correct.
>
> Thanks and Regards,
> Bhavani
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Regarding-traceExceptions-in-Tracer-tp5727336.html
> Sent from the Camel Development mailing list archive at Nabble.com.



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

Reply via email to