【发布时间】:2015-10-03 22:18:17
【问题描述】:
在同步通道的拆分器和聚合器流期间需要帮助处理链中的错误。 下面是用例,它将是同步通道。所以在链中会有一组服务激活器来执行业务逻辑。现在,如果链中存在的服务激活器中有任何异常,我希望在链本身中处理它并继续处理其他拆分的消息。
为了做到这一点,我尝试为链中的错误处理程序添加标题丰富器。但没有奏效。任何建议。
Object1 包含列表
流程:
List 代码 <int:chain input-channel="ch3" output-channel="ch10" >
<int:header-enricher>
<int:error-channel ref="exception1" ></int:error-channel>
</int:header-enricher>
<int:service-activator ref="myService" method="method1"></int:service-activator>
<int:service-activator ref="myService" method="method2"></int:service-activator>
<int:service-activator ref="myService" method="method3"></int:service-activator>
<int:service-activator ref="myService" method="method4"></int:service-activator>
</int:chain>
<!-- Exception channel for chain and the output should go to the chain output channel -->
<int:chain input-channel="exception1" output-channel="ch10" >
<int:service-activator ref="exp" method="myException"></int:service-activator>
</int:chain>
【问题讨论】: