Camel Transacted: MQ Session closed on every commit

匿名 (未验证) 提交于 2019-12-03 01:06:02

问题:

I have:

  • Camel route (transacted=true), consuming from an MQ Queue
  • Using Spring's WebSphereUowTransactionManager
  • Transactionality works
  • Running on 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. 

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

回答1:

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.

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!