WebSphere MQ 的独立 Java JMS 客户端
我可以仅使用带有标准 JMS 的 WebSphere 的 jar 文件来将消息发送到 WebSphere MQ 服务器,还是需要下载其 WebSphere MQ 客户端?
Can I use just WebSphere's jar files with standard JMS to send messages to a WebSphere MQ server, or do I need to download their WebSphere MQ Client?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以仅使用 JMS 和本机 Java MQ API 的 jar 文件,但问题是您是否真的愿意这样做。完整的客户端安装包括源和对象形式的示例程序、实用程序、跟踪等。当您向 IBM 提交故障单时,他们可能会要求您提供将使用这些工具收集的信息。如果您没有完整安装,您可能无法提供所需的诊断信息。因此,IBM 支持完整的客户端安装。如果您只是想学习 JMS 并编写一个玩具应用程序,这可能没问题。如果应用程序即将投入生产,并且您可能希望有一天获得支持,请安装客户端。
WMQ 客户端安装是免费的,可通过 SupportPac MQC7 获取。在V7客户端上开发是一个很好的选择,因为它与V6 QMgr兼容。当 V6 于 2012 年 9 月停止服务时,这可以为您节省一些测试时间。
请注意,另一个响应中提到的 JMS 瘦客户端 在信息中心中被描述为“一个 Java 服务集成总线 JMS 客户端,旨在运行作为 IBM®、Sun 和 HP Java 运行时环境 (JRE) 下 Java SE 应用程序中的可嵌入客户端,该客户端支持无事务和本地事务模型。”如前所述,它是 SI 总线客户端而不是 MQ 客户端,平台支持有限,甚至缺乏单阶段提交。实际的 WMQ 客户端特定于 WebSphere MQ,具有广泛的平台支持并提供单阶段提交事务性。
更新:
自 2012 年 4 月 24 日起,任何平台上任何版本的 WMQ 的扩展事务客户端不再收费。我删除了答案中解释先前许可条款的部分。
You can use just the jar files for both JMS and the native Java MQ API but the question is whether you really want to. The full client install includes sample programs in source and object form, utilities, tracing and more. When you open a trouble ticket with IBM they may ask for information that you would use these tools to gather. If you do not have the full install you may not be able to provide the requested diagnostic information. For this reason, IBM supports the full client installation. If you are just trying to learn JMS and writing a toy application this is probably OK. If the application is going into Production and you may want to get support on it someday, install the client.
The WMQ client install is free and available as SupportPac MQC7. It is a good is a to develop on the V7 client since it is compatible with the V6 QMgr. This saves you some testing when V6 goes out of service in September 2012.
Note that the JMS Thin Client referred to in another response is described in the Infocenter as "a Java service integration bus JMS client designed to run as an embeddable client in Java SE applications under the IBM®, Sun and HP Java run-time environments (JREs). The client supports no transaction and local transaction models." As noted there it is an SI Bus client not an MQ client, has limited platform support and lacks even single-phase commit. The actual WMQ client is specific to WebSphere MQ, has broad platform support and provides single-phase commit transactionality.
UPDATE:
As of April 24th 2012, there is no longer a charge for the Extended Transactional Client for any version of WMQ on any platform. I've removed the portion of the answer that explained the previous license terms.
您需要适当的 jar 来创建所谓的 JMS 瘦客户端。这将允许您使用标准 JMS 与 MQ 对话。您不需要特定客户端之一,除非您想要访问特定的 MQ API 而不是 JMS。
You need the appropriate jars for creating what is called a JMS thin client. This will allow you to use standard JMS to talk to MQ. You do not need one of the specific clients unless you want access to the specific MQ API instead of JMS.
我见过应用程序团队无数次这样做。
几乎每次他们都会在某个时候遇到问题,然后向当地支持人员请求支持/帮助。
在没有标准 mq 工具/日志记录/跟踪的环境中诊断问题实际上是不可能的。你甚至无法找出它是什么版本的 MQ (dspmqver)
来自不同安装的不同 jar 会混合在一起,通过电子邮件发送等等......
我永远无法理解为什么人们不直接安装客户端并完成它。无论安装需要多少兆字节,损失有那么大吗?
Ive seen app-teams do this on countless occasions.
Almost every time they will run into an issue at some point down the line and will then request support/help from their local support.
Diagnosing an issue on an environment that none of the standard mq tools/logging/tracing is virtually impossible. You cant even find out what version of MQ it is (dspmqver)
Different jars from different installations get mixed up, emailed around etc...
I can never understand why people dont just install the client and be done with it. Is it that big a deal to lose however many hundred meg the install takes ?
要发送或管理Websphere MQ的消息,您可以使用jms客户端(例如HermesJMS + mq系列库),查看教程:
http://www.hermesjms.com/confluence/display/HJMS/WebSphereMQ
在此处查看演示:http://www.hermesjms.com/demos/demo_mq.html
To send or manage message of Websphere MQ, you can use jms client like HermesJMS + the mq series libs, check it tutorial:
http://www.hermesjms.com/confluence/display/HJMS/WebSphereMQ
Check the demo here: http://www.hermesjms.com/demos/demo_mq.html