2015-09-17 24 views
0

我在Spring集成中遇到StoredProcOutboundGateway的reply-timeout属性问题。我已经阅读了文档,并且说在Gateway的直接通道的情况下,回复超时将不起作用。但在外部集成网关的情况下,即StoredProcOutboundGateway它说:
“发送到DirectChannel时,将发生在发送者的线程中调用,以便发送操作的失败可以通过进一步下游的其它部件引起”回复超时为StoredProcOutboundGateway

按我的设计我的StoredProcOutboundGateway答复发送到直接channel.StillProcOutboundGateway在答复时间到期后抛出异常? 。为了重新创建这个场景,我在StoredProcOutboundGateway.handleRequestMessage方法的第一行放置了一个调试点并等待配置的回复超时,但它没有抛出任何异常,即使在配置时间之后它也返回成功的响应。

<int:gateway id="idGateway" service-interface="Gateway"> <int:method name="getStoreProcData" request-channel="store.req.channel" reply-channel="store.reply.channel" /> </int:gateway> <int-jdbc:stored-proc-outbound-gateway stored-procedure-name="GE_PKG.GET_PRC" ignore-column-meta-data="true" reply-timeout="2000" request-channel="store.req.channel" reply-channel="store.reply.channel" is-function="false" ............other cursor config </int-jdbc:stored-proc-outbound-gateway>这里 <int:channel id="store.req.channel" /> <int:channel id="store.reply.channel" /> Spring的集成V4..1.2 DB甲骨文输入代码ojdbc6

回答

1

reply-timeout只申请如果reply-channel可以阻止 - 如界QueueChannel是满的。

即它是sendreply-channel的超时。

它永远不会发生在DirectChannel

+0

.thanks。它可能在商店proc出站网关部分的文档中提到过 –