使用 Glassfish 2.1 本地无状态会话 bean 的 JNDI 查找导致异常

发布于 2024-12-19 13:09:46 字数 394 浏览 2 评论 0原文

目前我们使用 Glassfish 2.1 作为我们的应用程序容器。我们有一个使用 EJB (3.0) 和 JPA 的应用程序。 该应用程序运行 Oracle Coherence,并使用 CacheLoader 从数据库加载数据。 CacheLoader 是一个 POJO,它使用 JNDI 来查找 EJB 的本地实例。

Coherence 有一个称为 ServiceGuardian 的功能,它会终止操作期间超时的任何 Coherence 线程。

JNDI 查找工作正常,但如果出现通信故障并且线程已被终止,则连续调用会导致 JNDI 查找失败。 调试代码显示 InitialContext 在“java:comp”中没有任何绑定

线程被终止后 JNDI 查找失败是否有原因?任何帮助将不胜感激。

谢谢!

Currently we are using Glassfish 2.1 as our application container. We have an application that is using EJB's ( 3.0 ) and JPA.
The application runs Oracle Coherence, and uses a CacheLoader to load data from the Database. The CacheLoader is a POJO that uses JNDI to find the local instance of the EJB.

Coherence has a feature called ServiceGuardian, which kills any of the Coherence threads that have timedout during an operation.

The JNDI lookup works correctly, but if there is a communication failure and the threads have been killed, the consecutive calls cause the JNDI lookups to fail.
Debugging the code shows that the InitialContext does not have any bindings in "java:comp"

Is there a reason why the JNDI lookup fails after the threads have been killed? Any help would be greatly appreciated.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文