当 OpenJMS 挂起时,InitialContext() 不断生成新线程
全部, 在我的测试场景中,我让 openJMS 处于挂起状态(故意)。问题是,访问它的应用程序不断生成新线程,即使我使用超时的 Future/Callable,这些线程仍处于“阻塞”状态。我可以看到发生了超时,但该线程仍然处于阻塞状态。
罪魁祸首是这一行: initContext = new InitialContext(env);
我将其包装在 try/catch/finally 中,最后我检查是否 initContext != null 并关闭它。问题是它不为空,因为它挂起并超时。最终我可以看到许多线程正在生成并处于阻塞状态。
关于如何解决这个问题有什么想法吗?提前致谢!
All,
In my test scenario, I have openJMS in a suspended state (deliberately). The problem is that the application accessing it keeps spawning new threads which remain in a "blocked" state even though I am using Future/Callable with a timeout. I can see that a timeout happens, but that thread still remains in a blocked state.
The culprit is this single line: initContext = new InitialContext(env);
I have that wrapped in a try/catch/finally and in finally I check if initContext != null and the close it. Problem is that its not null because its hung and times out. Eventually I can see many threads being spawned and in blocked state.
Any idea on how to tackle this? Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论