Camel Transacted:MQ 会话在每次提交时关闭 [英] Camel Transacted: MQ Session closed on every commit

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

问题描述

我有:

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

但是,我收到了这条消息:

But, I get this message:

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.

这似乎与此有关 其他 Stack Overflow 问题,但我尝试更改 server.xml 中的配置,但没有成功.

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

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

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