gpt4 book ai didi

java - 在大型机中使用 JMS 从 java 连接到 MQ

转载 作者:行者123 更新时间:2023-12-02 03:26:38 24 4
gpt4 key购买 nike

我正在尝试使用也驻留在大型机服务器中的 Java 代码连接到大型机中的 QueueManager。我们是否有任何示例代码可以从在大型机上下文中运行的 java 连接到大型机 MQ?我们需要使用客户端还是绑定(bind)模式进行连接?

最佳答案

在 WMQ 的示例目录中,您将拥有使用核心 MQI API(MQQueueManager、MQQueue)和使用 MQ Core API 的代码。它们与 JAVA 和 MQ API 语义一致(不依赖于平台)。这些应该允许您与 Queue/QueueManager 进行通信。

您可以在此处引用一些代码 ( http://www.capitalware.com/pc_win_code_java.html )。

至于客户端与绑定(bind)模式,你必须引用( https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q030560_.htm )

WebSphere® MQ classes for Java™ can connect in client or bindings mode.Programmable options allow WebSphere MQ classes for Java to connect to WebSphere MQ in either of the following ways: As a WebSphere MQ MQI client using Transmission Control Protocol/Internet Protocol (TCP/IP) In bindings mode, connecting directly to WebSphere MQ using the Java Native Interface (JNI) Clients cannot be run on z/OS®, but clients on other platforms can connect to a WebSphere MQ for z/OS queue manager if the Client Attach Facility is installed.

关于java - 在大型机中使用 JMS 从 java 连接到 MQ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38780404/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com