Hallo all:
I have this simple configuration:
As you can see I need to redefine the error channel on a chain to handle the exceptions thrown by that chain in a particular way.Code:<!-- Chain error handler --> <int:chain input-channel="defaultErrorChannel" output-channel="responseChannel"> <int:service-activator ref="errorHandlerActivator" /> </int:chain> <int:gateway id="gateway" service-interface="it.sample.integration.error.gateway.Gateway" default-request-channel="preProcessingChannel" error-channel="defaultErrorChannel"/> <int:chain input-channel="preProcessingChannel" output-channel="responseChannel"> <int:header-enricher> <int:error-channel ref="customErrorChannel"/> </int:header-enricher> <int:service-activator ref="throwExceptionActivator" method="activate" /> </int:chain> <int:chain input-channel="customErrorChannel" output-channel="responseChannel"> <int:service-activator ref="customErrorHandlerActivator" method="activate" /> </int:chain>
I redefined the error channel property on the chain as follows <int:error-channel ref="customErrorChannel"/> but when the sequent activator throws an exception the message is redirected to the defaultErrorChannel defined on the initial gateway.
Where am I wrong?
Kind regards
Massimo


Reply With Quote
