ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Trouble with Remote Queue Concept and JMS

Post new topic  Reply to topic
 Trouble with Remote Queue Concept and JMS « View previous topic :: View next topic » 
Author Message
dant
PostPosted: Fri Apr 01, 2005 1:35 pm    Post subject: Trouble with Remote Queue Concept and JMS Reply with quote

Newbie

Joined: 01 Apr 2005
Posts: 5

Hello all,

I am confused about the JMS abstraction of the MQ objects. From what I can tell, one creates one QCF (QueueConnectionFactory) for each QueueManager one has. Well, assuming this is true, and say I have a QueueManager with 2 local queues and one remote queue, I am not sure if you create 3 JMS Queues (Two for local, one for remote).

Essentially, I have two QueueManagers running on my local machine, one on port 1414, the other on 1415. This is being done for sandbox purposes and development. Eventually my application will have one QueueManager that is accessed via JMS, and the other QueueManager will belong to another non JMS system.

I have a script that I used to create the JMS administerd object with the JMSAdmin tool. It looks like this:

<script>
echo def qcf(xQCF) QMGR(QMX) > ivtsetup.scp
echo def q(xProductionQ) qu(X.PROD) QMGR(QMX) >> ivtsetup.scp
echo def q(xTrainingQ) qu(X.TRAIN) QMGR(QMX) >> ivtsetup.scp
echo def q(xRemoteQueue) qu(Y.PROD) QMGR(QMX) >> ivtsetup.scp

echo def qcf(yQCF) QMGR(QMY) >> ivtsetup.scp
echo def q(yQ) qu(Y.PROD) QMGR(QMY) >> ivtsetup.scp

</script>

In a program that has access to the JNDI namespace where these JMS administered objects reside, what JMS objects do I need to send a message to the remote defined queue, Y.PROD?

Essentially, I would imagine I need the xQCF to get the connection, session, etc, but can you use the connections gained from xQCF to write a message to yQ?

Is this right?

[edit] Or is it just as simple as using the yQCF to write to yQ? I wasn't sure if I was supposed to create a QCF and Q for an MQ Server that won't be accessed via JMS. Perhaps just keeping references to other MQServers in the JNDI namespace is totally legit. Again I am not sure if one creates only JMS Queues that are defined as local within MQ vs. also defining JMS Queues for remote queues as well.

TIA.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Apr 01, 2005 1:48 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Connecting to xQCF send a message to xRemoteQueue using JNDI.

This will post the message to the queue as defined in the JNDI setup.
Now of course I would strongly suggest that you have a default way to communicate between xqmgr and yqmgr otherwise you're in for a few surprises.

You could as well have setup a remote queue on xQCF and send a message to that remote queue.

your setup would have looked something like this
Code:

echo "def qr(my.remote.yq) rqmname(yqmgr) rname(yq) xmitq(yqmgr)" | runmqsc XQMGR

echo " def q(yonx) qu(my.remote.yq) qmgr(xqmgr)" >> ivtsetup.scp


Then you would retrieve the xqcf factory and yonx queue and send to yonx queue.
Enjoy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Trouble with Remote Queue Concept and JMS
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.