Springframework.jms.support.JmsAccessor不具备的createConnection(用户ID,PWD)方法 [英] Springframework.jms.support.JmsAccessor does not have createConnection(userid,pwd) method
问题描述
我写一个连接到IBM MQ队列管理器的客户端模式样本Apache的骆驼(2.16.2)应用程序。 Apache的骆驼使用Spring JMS下方连接到JMS提供者。我看到Spring JmsAccessor
不具有的createConnection
()方法,它的用户ID和密码。它只有一个不带任何参数的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?
推荐答案
包装你的连接工厂
在<一个href=\"http://docs.spring.io/spring-framework/docs/current/javadoc-api/index.html?org/springframework/jms/connection/UserCredentialsConnectionFactoryAdapter.html\"相对=nofollow> UserCredentialsConnectionFactoryAdapter 。
这篇关于Springframework.jms.support.JmsAccessor不具备的createConnection(用户ID,PWD)方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!