使用 JMS 的 WebSphere MQ
我有一个使用 WebSphere MQ Java API 和配置 (xml) 文件来访问 MQ 的应用程序。 我想迁移到 WebSphere JMS API。 为此我尝试创建 1) WebSphere MQ 队列连接工厂和 2) 来自我的本地 WAS 的 WebSphere MQ 队列目标。 当我配置队列目标并尝试设置 MQ 配置参数时,我收到一条错误消息,例如“WMSG0316E:您试图查看不是本地队列的队列。仅支持本地队列的管理。”
从我正在尝试连接到远程队列的意义上来说,该消息是正确的。 现在,我不能将 WAS 配置为尝试连接到远程队列的 MQ 客户端吗? MQ 客户端在服务器类路径中具有必要的 MQ JMS jar。
如果有人能对此有所启发,我将不胜感激。
I have an application that uses WebSphere MQ Java API along with a configuration (xml) file to access MQ. I would like to migrate to WebSphere JMS API. For this i try creating
1) WebSphere MQ Queue Connection factory and 2) WebSphere MQ Queue destinations from my local WAS. When i configure my Queue destinations and try to set my MQ Config parametes i get an error message like "WMSG0316E: You tried to view a Queue that was not a local Queue. Only administration of local Queues is supported."
The message is correct in the sense that i am trying to connect to a remote queue. Now, cant i configure my WAS as an MQ client trying to connect to a remote Queue ? The MQ Client has the necessary MQ JMS jars in the server classpath.
Would appreciate if anyone could throw some light into this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我正在研究同样的问题 - 我发现了一些文章,其中作者确认必须告诉 WebSphere 需要“客户端到远程队列”模式,但除此之外,我还没有找到有关如何做到这一点的详细信息作者提到了一个环境变量。
仍在搜索...如果找到解决方案,我会发布解决方案。
I'm working on this same issue - I've found articles where the authors confirm that WebSphere has to be told that "client to remote queue" mode is desired, but I have yet to find details on how to do that, beyond one author mentioning an environment variable.
Still searching ... I'll post the solution if I find one.
你能澄清一下吗? 您说您从本地 WAS“创建”了连接工厂和队列目的地。 您的意思是您自己构建这些对象吗?
如果是这样,这是错误的方法,您应该将资源配置为应用程序配置的一部分,然后通过 JNDI 查找它们。 配置是将本地 JMS 资源绑定到实际实现(在您的情况下是远程 MQ 服务器)的地方。 您的代码应该只绑定到 JMS,而不是具体的实现。
Can you clarify something. You say that you 'Create' the connection factory and queue destination from your local WAS. Do you mean you are constructing the objects yourself?
If so, this is the wrong approach, you should be configuring the resources as part of your applications configuration and then looking them up via JNDI. The configuration is where the local JMS resources are bound to the actual implementation, in your case the remote MQ server. Your code should only be bound to JMS, not the specific implementation.
我剪& 将您的错误消息粘贴到 Google 中。 以他们独特的风格,这里是有关您的问题的 IBM 文档。 有帮助,不是吗?
您在哪里设置了您尝试联系的队列? 它是与您部署的 WebSphere 实例在同一台服务器上运行,还是远程服务器? 如果是后者,我想知道您是否需要桥或代理,以便您可以在本地发送消息,但通过代理将其显示在远程服务器上。
更新:我不知道,但也许解决这个问题的一种方法是设置一个本地队列,类似于您所说的工作方式,并让它简单地将所有消息转发到远程队列。
I cut & pasted your error message into Google. In their inimitable style, here are the IBM docs on your issue. Helpful, no?
Where did you set up the queue that you're trying to contact? Is it running on the same server as the WebSphere instance you've deployed on, or is it a remote server? If it's the latter, I wonder if you need a bridge or proxy so you can appear to send the message locally but have it appear on the remote server via proxy.
UPDATE: I don't know, but perhaps one way to get around this is to set up a local queue, similar to what you say is working, and have it simply forward all messages to the remote queue.