Author |
Message
|
reddy_kal |
Posted: Thu Nov 07, 2002 2:37 pm Post subject: How to connect to remote Queue Manager from JMS |
|
|
Acolyte
Joined: 04 Nov 2002 Posts: 73
|
Hi,
I am using IH06 support pack of IBM for pub/sub in JMS.
I am trying to connect to Remote Queue Manager from my application. But its giving exception
Exception thrown in jmsConnect
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'MQD'
where 'MQD' is a remote Queue Manager.
I am doing a sample application which is in IH06v1.1 supportpack.
I have everything setup. I have created TCF, T, TOPIC.
Still it is giving this exception.
Can anyone help me in this.
Thanks
Reddy |
|
Back to top |
|
 |
abmanesh |
Posted: Fri Nov 08, 2002 6:41 am Post subject: |
|
|
Apprentice
Joined: 06 Nov 2001 Posts: 39
|
Hi Reddy,
'Am not clear about what you mean by remote queu manager. I assume you are trying to connect to a Queumanager as as a client. When you defined the topic connection factory with JMSAdmin tool, you could specify the transport property as client. Check your TCF definition, if you could post it here , we may be able to help. |
|
Back to top |
|
 |
reddy_kal |
Posted: Fri Nov 08, 2002 1:41 pm Post subject: |
|
|
Acolyte
Joined: 04 Nov 2002 Posts: 73
|
Hi Manesh,
Thanks for the reply.
I tried to connect to local queue manager. Its working fine
Actually what I have done is...
runmqsc <RemoteQueueManager> < MQJMS_PSQ.mqsc
Actually I have created all the queues in the remote system from file --> \java\bin\MQJMS_PSQ.mqsc
SYSTEM.JMS.ADMIN.QUEUE
SYSTEM.JMS.PS.STATUS.QUEUE
SYSTEM.JMS.REPORT.QUEUE
SYSTEM.JMS.MODEL.QUEUE
SYSTEM.JMS.ND.SUBSCRIBER.QUEUE
SYSTEM.JMS.ND.CC.SUBSCRIBER.QUEUE
SYSTEM.JMS.D.SUBSCRIBER.QUEUE
SYSTEM.JMS.D.CC.SUBSCRIBER.QUEUE
then started JMSAdmin created TCF, T, TOPIC (in the local system) using
DEFINE TCF(<Remote Broker Name>) and some names for T and TOPIC (say T(READINGS) TOPIC(meter/reading))
(Created in the local system)
* Created some message flows in MQSI for Remote Queue Manager.
* Just a I/p node and a Publish Node.
* Executed that message flow
* Opened IH06 (I mean executed IH06.bat)
* In the Environment settings in IH06. I am not getting any errors in log(TextArea).
But in the JMS tab after entering the Broker Name in the TCF column and
trying to connect then its giving the following error
--------------------------------------------------------------------------------
Exception thrown in jmsConnect
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'MQD'
Where MQD is my remote Queue Manager.
------------------------------------------------------------------------------- |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Nov 11, 2002 11:47 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
If you want to client connect, you need to change your TCF definition so that it is client based:
def tcf(clientTCF) qmgr(REMOTE.QMGR) transport(CLIENT) channel(MYCHANNEL) hostname(myhost) port(1414)
If you are trying to use a broker as a remote qmgr, take a look at:
http://www.mqseries.net/phpBB/viewtopic.php?t=3278 |
|
Back to top |
|
 |
reddy_kal |
Posted: Mon Nov 11, 2002 1:25 pm Post subject: |
|
|
Acolyte
Joined: 04 Nov 2002 Posts: 73
|
Hi Bower,
Thanks Bower.
Actually my problem is different. I have created a topic called "Shipment/Data" using the control center on the remote queue manager (and on remote Broker domain). Now I need to register subscription and publication to that topic. So can you help me in this. How should I poceed. In the Pub/Sub user guide manual they said to do
MQPSCommand RegSub
MQPSRegOpts PubOnReqOnly
MQPSRegOpts CorrelAsId
MQPSStreamName SAMPLE.BROKER.RESULTS.STREAM
MQPSTopic Sport/Soccer/State/LatestScore/*
But I am unable to do this. Where should I type thsi commands and what commands I have to type for registration.
Thanks
Reddy |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Nov 13, 2002 9:43 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I've never used the commands to register something. I've looked at the soccer sample (soccerGame.c, soccerResults.c) that ships with WMQI and they have a BuildMQRFHeader2 routine that seems to do what you are looking for. I'd suggest looking them over and see if they help. |
|
Back to top |
|
 |
|