Back Forum Reply New

Channel interceptor for synchronous reply channels

Hello,

is there any way to configure channel interceptors for the responses of a synchronous call? Currently we are calling them manually but it would be great if it were possible to configure the interceptors in xml.

Thank you,
Dimo

Can you describe what you mean (or show some code) when you say, you are quot;calling them manuallyquot;?

Hi Mark,

this is how I would configure a channel interceptor in XML:
--cut--   lt;int:channel id=quot;aChannelquot;gt;       lt;int:interceptorsgt;lt;bean class=quot;org..integration.transformer  .MessageTransformingChannelInterceptorquot;gt;    lt;constructor-arg ref=quot;anUnmarshallingTransformerquot; /gt;lt;/beangt;       lt;/int:interceptorsgt;   lt;/int:channelgt;
--cut--
Unfortunately, I can not find similar way to configure an interceptor for the temporary response channel.
By manually I mean we have implemented a service activator which forwards the messages to the actual channel and invokes a list of configured interceptors after receiving the response:
--cut--
Messagelt;?gt; response = messageChannelTemplate.sendAndReceive(request, actualChannel);
// invoke interceptors on the response
--cut--
Is there any way to configure the interceptors as in the first snippet?

Best regards,
Dimo
¥
Back Forum Reply New