如果 JBOSS MDB 在启动时失败,我们如何才能重试连接?

发布于 2024-08-10 18:28:47 字数 446 浏览 3 评论 0原文

我们有一个服务器应用程序,部署在服务器计算机上,每台服务器都运行 JBOSS 4.2.2。我们使用 JBOSS 消息传递和 MDB 在系统之间进行通信。目前我们需要以非常特定的顺序启动服务器,以便 JBOSS 可以正确连接。如果服务器启动后看不到其资源,它就不会再尝试。当我们不断地跳出服务器时,这在测试中会出现问题并且耗时。我们相信,如果我们可以在 JBOSS 中指定重试标志,就可以重新尝试获取连接。

JBOSS 中是否有一个标志/配置选项可以在启动失败时重新尝试获取 JMS 连接?

我对 JMS 技术还很陌生,所以完全有可能我在这里混淆了一些术语。由于此功能将在内部使用,因此实验或弃用的选项都是可以接受的。

编辑:问题是消费者在没有可用生产者的情况下启动,随后失败,再也不会尝试。如果消费者和生产者都已启动并且生产者死亡,则消费者将重试生产者回来。

We have a server app that is deployed across to server machines, each running JBOSS 4.2.2. We use JBOSS messaging with MDBs to communicate between the systems. Currently we need to start the servers in a very specific order so that JBOSS can connect properly. If a server starts and doesn't see its resources it never tries again. This is problematic and time consuming in testing when we're bouncing servers constantly. We believe that if we could specify a retry flag in JBOSS could reattempt to get the connection.

Is there a flag/config option in JBOSS that would reattempt to obtain JMS connections on failure at startup?

I am quite new to the JMS technology, so it is entirely possible that I have mixed up some terms here. Since this capability is to be used in house experimental or deprecated options are acceptable.

Edit: The problem is that a consumer starts up with no producer available and subsequently fails, never to try again. If a consumer and producer are up and the producer dies the consumer will retry for the producer to come back.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

稀香 2024-08-17 18:28:47

我 95% 确信 JBoss MDB 确实会重试这样的连接。如果您的 MDB 没有按照您的预期接收消息,我认为还有其他问题。 MDB 是否依赖于任何其他资源。也许发布您的 EJB 描述符(META-IF/ejb-jar.xmlMETA-IF/jboss.xml)会有所帮助。

I'm 95% sure that JBoss MDBs do retry connections like that. If your MDBs are not receiving messages as you expect, I think something else is wrong. Do the MDBs depend on any other resources. Perhaps posting your EJB descriptors (META-IF/ejb-jar.xml and META-IF/jboss.xml) would help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文