骆驼交易:每次提交都关闭MQ会话 [英] Camel Transacted: MQ Session closed on every commit

查看:107
本文介绍了骆驼交易:每次提交都关闭MQ会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有:

  • 从MQ队列中消费的骆驼路线(transacted = true)
  • 使用Spring的WebSphereUowTransactionManager
  • 交易性有效
  • 在IBM Liberty上运行

但是,我收到此消息:

Setup of JMS message listener invoker failed for destination 'MY.QUEUE' - trying to recover. 
Cause: Local JMS transaction failed to commit; nested exception is com.ibm.msg.client.jms.DetailedIllegalStateException: 
MQJCA1020: The session is closed.
The application attempted to use a JMS session after it had closed the session.
Modify the application so that it closes the JMS session only after it has finished using the session.

这似乎与此

This appears to be related to this other Stack Overflow question, but I've tried changing the configuration in server.xml, with no success.

推荐答案

您可以尝试设置cacheLevelName=CACHE_CONSUMER,它允许重新使用JMS使用者并避免无休止地创建/销毁JMS资源,如错误消息所示.可能是原因.

You can try setting cacheLevelName=CACHE_CONSUMER which allows to re-use the JMS consumer and avoids endless of creation/destruction of JMS resources, as indicated by the error message may be the cause.

您可以在Camel JMS文档中看到有关缓存级别的重要性的更多信息: http://camel.apache .org/jms

You can see more about the importanse of cache levels on the Camel JMS documentation: http://camel.apache.org/jms

这篇关于骆驼交易:每次提交都关闭MQ会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆