Flex 流超时
我有一个 Flex GUI,它在 WebLogic 9.2 上使用 AMF Streaming 到 BlazeDS。由于 AMF Streaming 使用长轮询,因此它可以长时间保持连接打开。
WebLogic 的最大线程超时为 600 秒。如果线程的活动时间超过了超时时间,WebLogic 将引发错误并让线程超时。这会导致我的 GUI 失去连接并挂起。
我可以更改 WebLogic 中的默认设置 (StruckThreadMaxTime),但这显然会对合法卡住的线程产生负面影响。
请问谁能告诉我还有什么其他选择来解决这个问题?
I have a Flex GUI which is using AMF Streaming to BlazeDS on WebLogic 9.2. As the AMF Streaming uses long polling, it keeps the connection open for extended periods of time.
WebLogic has a max thread timeout of 600 seconds. WebLogic throws an error and times out the thread if it has been alive for longer than the timeout. This causes my GUI to lose its connection and hang.
I could change the default setting in WebLogic (StruckThreadMaxTime) but this would obviously negatively effect legitimately stuck threads.
Please can anyone tell me what other options I have to fix this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许您可以使用 Consumer.channelDisconnect 事件然后重新连接?
Perhaps you can use the Consumer.channelDisconnect event and then reconnect?
AIR2.0 帮助处理长轮询。您可以尝试找出它的工作原理并自己重新实现或设置计时器,并尝试在超时之前终止来自柔性端的连接(然后立即重新建立)
There is a new idle timeout API been added in AIR2.0 to help deal with long polling. You could try hunt down how it works and re-implement or setup timers yourself and try kill the connection from the flex end before the timeout (and then immediately re-estabilsh)