rajesh kumar
rajesh kumar

Reputation: 121

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? Do we need to connect using Client or Bindings mode?

Upvotes: 0

Views: 1437

Answers (1)

Ramachandran.A.G
Ramachandran.A.G

Reputation: 4948

In the samples directory of WMQ you will have code that uses core MQI API's (MQQueueManager , MQQueue) and uses MQ Core API's. They are consistent with the JAVA & MQ API semantics (Not dependent on Platform). These should allow you to communicate with Queue/QueueManager.

You can reference some of the code here (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)

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.

Upvotes: 2

Related Questions