MQ Series
To connect to an MQ Series server
1) Install MQ Client. Note that if you are on the same machine as the MQServer then the client should be installed using the server installation disks not eth client ones.
2) Set environment variable:
MQSERVER=[Channel]/[Protocol]/[HostName]([port])
[Channel] - Is the name of teh server connection channel that the client will use. The default vaue of SYSTEM.DEF.SVRCONN is usually sufficient.
[Protocol] - The network prorocol to use to communicate with the server. the default value of TCP is usually used.
[HostName] - Is the remote MQ Server hostname or IP address
[Port] - Is the port for the QM manager process on the MQ server. Normally the default (1414) will do.
So, a vald string looks like:
MQSERVER=SYSTEM.DEF.SVRCONN/TCP/aHost(1414)
To check client connectivity
Use a test utility bundled with the client: (in bin directory)
amqscnxc -x [server name]([port])
e.g. amqscnxc -x 192.168.100.14(1414) -c DEFAULT.SERVER.CON QNAME
If you leave the params off it looks for vaklues in MQSERVER environment variable so its a good way to test that is set correctly.
If that doesn't exist, use amqsputc [QName] [QMName]
Should be able to enter some text that will appear as a meessage. Then [enter] to submit to server
This also uses MQ Client and MQSERVER environment variable
From Java
Note that the MQClient jars are in the folder:
[MQ Root Dir]\eclipse\plugins\com.ibm.mq.runtime_7.0.0.1
E.g.:
C:\Program Files\IBM\WebSphere MQ\eclipse\plugins\com.ibm.mq.runtime_7.0.0.1
More info
http://www3.sympatico.ca/n.rieck/docs/mqseries_client_on_openvms.html
Using JMS to connect Java to MQ:
http://www.devx.com/Java/Article/40866/1954?pf=true
http://hursleyonwmq.wordpress.com/2007/05/29/simplest-sample-applications-using-websphere-
mq-jms/
http://www.academictutorials.com/jms/jsm-mqseries.asp
MQBooks:
http://www-01.ibm.com/software/integration/wmq/library/crossplatform_books.html
No comments:
Post a Comment