如何从 GlassFish 中消息驱动 Bean 的死锁中恢复?
在 GlassFish 中的 MDB 池上接收消息时,我遇到了死锁情况。如果我收到同时尝试更新同一组行的多条消息,MDB 会抛出 LockAcquisitionException。不幸的是,GlassFish JMS 提供程序立即重新传递消息,导致相同的异常再次发生。我希望将 JMS 提供程序配置为在延迟一段时间后重新交付,但这似乎不受支持。关于如何解决这个问题有什么想法吗?
I am running into a deadlock situation when receiving messages on a pool of MDBs in GlassFish. If I receive multiple messages that concurrently try to update the same set of rows, the MDB throws a LockAcquisitionException. Unfortunately the GlassFish JMS provider redelivers the message immediately causing the same exception to occur again. I was hoping to configure the JMS provider to redeliver after some delay, but this does not seem to be supported. Any ideas on how I could solve this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你看过吗
在 MQ Series 中配置“重试延迟”
捕获错误怎么样? ,睡觉,然后重新扔呢?
Have you looked at
Configuring a 'retry delay' in MQ Series
What about catching the error, sleeping, and then re-throwing it?
以下是一些有关配置选项的 Oracle 文档的链接:
http://download.oracle.com/docs /cd/E19798-01/821-1794/aeooq/index.html
endpointExceptionRedeliveryAttempts
这将允许您捕获错误。然后,您可以在故障/RME 端点上实现 MBean 并添加人为延迟,
但目前似乎没有办法在 GlassFish 中设置重试延迟。
Here's a link to some Oracle documentation on the configuration options:
http://download.oracle.com/docs/cd/E19798-01/821-1794/aeooq/index.html
endpointExceptionRedeliveryAttempts
This will allow you to catch errors. You could then implement an MBean on the Fault/RME endpoint and add in artificial delays
But there doesn't appear to be a way to put a retry delay in GlassFish at this time.