简体   繁体   English

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

[英]Connecting to MQ from java using JMS in Mainframe

I am trying to connect to a QueueManager in Mainframe using Java code which also resides in Mainframe Server.Do we have any sample code to connect to Mainframe MQ from java which runs in Mainframe context? 我正在尝试使用也位于Mainframe Server中的Java代码连接到Mainframe中的QueueManager。我们是否有示例代码可以从在Mainframe上下文中运行的Java连接到Mainframe MQ? Do we need to connect using Client or Bindings mode? 是否需要使用“客户端”或“绑定”模式进行连接?

In the samples directory of WMQ you will have code that uses core MQI API's (MQQueueManager , MQQueue) and uses MQ Core API's. 在WMQ的示例目录中,您将拥有使用核心MQI API(MQQueueManager和MQQueue)并使用MQ Core API的代码。 They are consistent with the JAVA & MQ API semantics (Not dependent on Platform). 它们与JAVA&MQ API语义一致(不依赖于平台)。 These should allow you to communicate with Queue/QueueManager. 这些应该允许您与Queue / QueueManager进行通信。

You can reference some of the code here ( http://www.capitalware.com/pc_win_code_java.html ). 您可以在此处引用一些代码( http://www.capitalware.com/pc_win_code_java.html )。

As for client vs Bindings mode , you will have to refer ( https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q030560_.htm ) 对于客户端vs绑定模式,您必须参考( 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™的WebSphere®MQ类可以以客户机或绑定方式连接。可编程选项允许用于Java的WebSphere MQ类通过以下两种方式之一连接到WebSphere MQ:作为使用传输控制协议/ Internet协议(TCP)的WebSphere MQ MQI客户机。 / IP)在绑定方式下,使用Java本机接口(JNI)客户端直接连接到WebSphere MQ不能在z /OS®上运行,但是如果该客户端,其他平台上的客户端可以连接到WebSphere MQ for z / OS队列管理器已安装附加工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM