Springframework.jms.support.JmsAccessor 没有 createConnection(userid,pwd) 方法 [英] Springframework.jms.support.JmsAccessor does not have createConnection(userid,pwd) method

查看:20
本文介绍了Springframework.jms.support.JmsAccessor 没有 createConnection(userid,pwd) 方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写示例 Apache Camel (2.16.2) 应用程序,该应用程序以客户端模式连接到 IBM MQ 队列管理器.Apache Camel 在底层使用 Spring JMS 连接到 JMS 提供者.我看到 Spring JmsAccessor 没有采用 UserId 和 Password 的 createConnection() 方法.它只有不带任何参数的 createConnection() 方法.因此,与队列管理器的创建连接失败,并显示 2035 - 未授权.

I am writing sample Apache Camel (2.16.2) application that connects to IBM MQ queue manager in clients mode. Apache Camel uses Spring JMS underneath to connect to JMS providers. I see that Spring JmsAccessor does not have a createConnection() method that takes UserId and Password. It only has createConnection() method that does not take any parameters. Because of this create connection to queue manager fails with 2035 - Not authorized.

我可以在服务器绑定模式下连接到队列管理器,但我需要在客户端模式下连接,因为队列管理器在另一台机器上运行.有没有办法解决这个问题?

I can connect to queue manager in server bindings mode but I need to connect in client mode as queue manager runs in a different machine. Is there a way I can get around this problem?

推荐答案

将您的 ConnectionFactory 包裹在 UserCredentialsConnectionFactoryAdapter.

这篇关于Springframework.jms.support.JmsAccessor 没有 createConnection(userid,pwd) 方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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