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 » General IBM MQ Support » Usage of Namelist

Post new topic  Reply to topic
 Usage of Namelist « View previous topic :: View next topic » 
Author Message
ajayvizag
PostPosted: Thu Nov 26, 2009 3:33 am    Post subject: Usage of Namelist Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

Hi All,
I would like to know how can a use or access a namelist in my MQClient which is a java program. I am done with creation of Namelist using the MQExplorer. I would like to know how to access that in my program.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Nov 26, 2009 3:51 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

access it to do what ? what are you trying to implement?
_________________
Regards, Butcher
Back to top
View user's profile Send private message
ajayvizag
PostPosted: Thu Nov 26, 2009 4:02 am    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

I have a requirement to put a message in muliple queues. So i thought of creating a namelist and accessing the queue names inside it and place the message in all the queue mentioned in it.
Back to top
View user's profile Send private message
zonko
PostPosted: Thu Nov 26, 2009 9:42 am    Post subject: Reply with quote

Voyager

Joined: 04 Nov 2009
Posts: 78

Go ahead then. The details of how to do this are in the APR, MQOPEN, MQOD, MQOR, MQPUT, MQPMO, MQRR, MQPMR.

Have a look at the sample app amqsptl0.c to see how it all fits together.
Back to top
View user's profile Send private message
ajayvizag
PostPosted: Fri Nov 27, 2009 2:49 am    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

Hi,
I have done the below things but didnt know how to open the namelist.
so i am stuck here

MQQueueManager mqQMgr=new MQQueueManager("XYZ");
int openoptions =MQC.MQOO_INQUIRE|MQC.MQOO_FAIL_IF_QUIESCING|MQC.MQOO_OUTPUT;
MQOD mqod = new MQOD();
mqod.ObjectName="TEST";
mqod.ObjectType=MQC.MQ_NAMELIST_NAME_LENGTH;

Stuck here i didnt get any info as to how to open the namelist and then access the queue names inside it..
Please help.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Fri Nov 27, 2009 3:47 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

Quote:
mqod.ObjectType=MQC.MQ_NAMELIST_NAME_LENGTH;


well, setting the object type to the length of a namelist name is definitely wrong. to me it looks like you have no experience in mqseries programming at all, and you try to write a program based on that knowledge. go have some more reading in the APR, and in "using java", and check the samples. Start with a more simple program, e.g. connect to qmgr and disconnect. then add a queue open put close. then add the inquire of the namelist to get the list of queues.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
ajayvizag
PostPosted: Fri Nov 27, 2009 3:55 am    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

Thanks for the suggestion. But i would like to say that if the above code sends a message that i am not aware of writing java code then i am sorry to say that you got it wrong. I would really appreciate if u would help me in addressing the problem.
Back to top
View user's profile Send private message
zonko
PostPosted: Fri Nov 27, 2009 4:21 am    Post subject: Reply with quote

Voyager

Joined: 04 Nov 2009
Posts: 78

I do not know anything about Java programming, but I can at least read a manual.
See this section:
Quote:

An MQOD instance is used to specify an object by name. The following types of object are valid:

Queue
Process definition
Queue manager


So, you cannot open a namelist in Java.
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Fri Nov 27, 2009 6:21 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

ajayvizag wrote:
I have a requirement to put a message in muliple queues. So i thought of creating a namelist and accessing the queue names inside it and place the message in all the queue mentioned in it.


Is the Namelist your ultimate requirement to solve the problems ?
If you got multiple instances of the queues in the same cluster then it would have solved the problem. ( thats workload and performance , if you have configured it properly ).
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Nov 27, 2009 7:57 am    Post subject: Reply with quote

Grand High Poobah

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

shashivarungupta wrote:
ajayvizag wrote:
I have a requirement to put a message in muliple queues. So i thought of creating a namelist and accessing the queue names inside it and place the message in all the queue mentioned in it.


Is the Namelist your ultimate requirement to solve the problems ?
If you got multiple instances of the queues in the same cluster then it would have solved the problem. ( thats workload and performance , if you have configured it properly ).


What does cluster load balancing have to do with this requirement?
Pub/Sub would be the other way to satisfy it.
Using the Namelist to build a distribution list is a common pattern. Look it up. I am sure there are some examples on the samples or on the net.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
shashivarungupta
PostPosted: Fri Nov 27, 2009 8:28 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

It was just the question to him...that if there is the solution of the problem can be solved with in the one cluster then why there is the need for the cluster namelist (unless he explains a good reason for that ). I don't have any objections though. Go ahead.

_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
exerk
PostPosted: Fri Nov 27, 2009 9:20 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

shashivarungupta wrote:
...if there is the solution of the problem can be solved with in the one cluster then why there is the need for the cluster namelist...


There you go again, either reading a different post to the rest of us, or seeing more than is there. Nowhere has the original poster stated that a cluster namelist was created, and his problem is putting to multiple queues, NOT multiple instances of a queue!
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Fri Nov 27, 2009 9:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

shashivarungupta,

Why are you discussing "cluster namelists" when the original post was about "namelists". There are 2 types of namelists in MQ: namelists (non-cluster) and cluster namelists.

Please stay on topic as it just confuses everyone when you start writing about random thoughts. Don't guess, ask the poster direct questions like "are you using X or Y?".

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
ajayvizag
PostPosted: Sun Nov 29, 2009 9:39 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Feb 2009
Posts: 31

Thank you all for ur valuabl suggestions. As some of u have rightly written that my requirement is to copy the same message into multiple queues. I have been digging in the manuals and it stated that namelist can be used in case of only few objects as said by one of you on top. Can anyone suggest me as to how to go with this problem. I am surrently writing down all the queue name in the configuration file and loading them in a hash table and getting them later to put messages to all of them one after the other but my intention was to have a design that will not impact the application(MQClient) i.e if i want to chage the queue names to which i have to publish i just need to modify at the MQLevel and do nothing to my code. Any body who has any idea pls help out
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Nov 29, 2009 11:21 pm    Post subject: Reply with quote

Grand High Poobah

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

ajayvizag wrote:
Thank you all for ur valuabl suggestions. As some of u have rightly written that my requirement is to copy the same message into multiple queues. I have been digging in the manuals and it stated that namelist can be used in case of only few objects as said by one of you on top. Can anyone suggest me as to how to go with this problem. I am surrently writing down all the queue name in the configuration file and loading them in a hash table and getting them later to put messages to all of them one after the other but my intention was to have a design that will not impact the application(MQClient) i.e if i want to chage the queue names to which i have to publish i just need to modify at the MQLevel and do nothing to my code. Any body who has any idea pls help out

Like stated above, lookup an example of the distribution list in the manuals and the samples. If you want complete isolation between sender and receiver you should use the pub/sub pattern. (read the pub/sub manual)

Have fun
_________________
MQ & Broker admin
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 » General IBM MQ Support » Usage of Namelist
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.