Thanks gsegares_cr, but I was looking for something more global.

I've found InterceptStrategy. So I added it to
CamelContext.addInterceptStrategy and wrap the target Processor:

void process(Exchange exchange) {
  try { 
    myCustomScope.startCustom();
    target.process();
  } finally {
    myCustomScope.stoptCustom()
  }
}

That fit very well as I've seen.

Thanks.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Intercept-before-and-after-routes-invocations-tp5764529p5764555.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to