On 4/19/07, dr.jeff <[EMAIL PROTECTED]> wrote:
What is the intended usage of interceptors?
e.g. using security or transaction interceptors. See the camel-jpa module for some examples (such as the Jpa based IdempotentConsumer test case which uses a default transaction interceptor. We could also use interceptors to do transformations too
Do I get the get the message from exchange.getIn() and, say, modify its body?
Sure if you like
Or should I somehow be putting the modifications into the exchange.getOut() message?
You can do either really. getOut() is only intended for request-response (InOut) exchange patterns and the out is usually written by the actual service. so you could modify the IN before the service is invoked, then modify the generated OUT after the service has been invoked if you like. e.g. class MyInterceptor extends ProcessorDelegate<Exchange> { ... void process(Exchange exchange) { // modify IN processNext(exchange); // modify OUT } -- James ------- http://macstrac.blogspot.com/