|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Getting List of Queues |
« View previous topic :: View next topic » |
Author |
Message
|
Michael Dag |
Posted: Sat Mar 26, 2005 7:23 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
klamerus wrote: |
I appreciate these are rather fundamental questions and the help that everyone's been providing. I have found that there are very few flames or rants in this forum, which is very refreshing. |
let's just say integration people are a rare species, no point in burning someone else down, the occasional freebie riders can easily be picked out of the crowed and get put in there place politely...  _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
kevinf2349 |
Posted: Sat Mar 26, 2005 7:42 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Just to play devils advocate for a little while....if money isn't a big issue...why not buy in the MQ skills in the form of a new employee? That way you would have onsite help whenever you needed it  |
|
Back to top |
|
 |
klamerus |
Posted: Sat Mar 26, 2005 9:55 am Post subject: |
|
|
 Disciple
Joined: 05 Jul 2004 Posts: 199 Location: Detroit, MI
|
Well, I look at forums as a place for Q&A, and there's no A without Q
So far as employees goes, it's a question of supply and demand. Supply of people with these skills is low, but demand is even lower. I've just inherited this system from another guy who was responsible for it. It is about 4 years old. This is something I'm putting in place to improve client relationship and improve support (items he apparently thought that important). Once this is done, we're back to really only needing our in-house support skills and limited programming skills. Actually, that's only half true. We've got a pretty decent amount of code working with the queues, in C, but strictly for the purpose of adding and removing messages. Nothing in this area. I'm getting the team training on MQ (and a bunch of other stuff), but it's not there now. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Sat Mar 26, 2005 4:39 pm Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
That makes sense if the demand isn't there. This website is a truly valuable resource, especially when used correctly.
I think most of the rants and flames are directed towards those (thankfully few) people that post what are essentially very basic MQ questions without even attempting to get search results before hand....or even pick up the manual.
I am a long time MVS system programmer and I have to say that I find the MQ Manuals are some of the very best out there...more readable than many of the z/OS ones thats for sure! |
|
Back to top |
|
 |
malammik |
Posted: Mon Mar 28, 2005 7:00 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
public List getQueueNames() {
PCFAgent agent = null;
Set queueNames = new HashSet();
try {
agent = MqPcfUtil.getPCFAgent(qmanager);
if(agent == null){
logger.info("PCFAgent failed to connect Queue Manager :" + qmanager.getQmanager_nm());
return Collections.EMPTY_LIST;
}
logger.debug("got connection");
PCFParameter[] parameters = { new MQCFST(CMQC.MQCA_Q_NAME, QFlexUtil.STAR), new MQCFIN(CMQC.MQIA_Q_TYPE, CMQC.MQQT_LOCAL)};
logger.debug("sending responses");
MQMessage[] responses = agent.send(CMQCFC.MQCMD_INQUIRE_Q, parameters);
logger.debug("got reply");
logger.debug("parsing responses");
List responseParameters = MqPcfUtil.getMessagesParameterMap(responses);
logger.debug("parsing responses complete");
for (int i = 0; i < responseParameters.size(); i++) {
Map pcfParams = (Map) responseParameters.get(i);
String queueName = (String) pcfParams.get(new Integer(CMQC.MQCA_Q_NAME));
// Collect queue names.
if (StringUtils.isNotEmpty(queueName)) {
// Check if queue name has to be skipped.
if (isNotFilteredObject(QUEUE_FILTERS, queueName)){
queueNames.add(queueName.trim());
//logger.debug(queueName);
}
}
}
}
catch (MQException e) {
logger.error("CC " + e.completionCode + " RC :" + e.reasonCode, e);
}
catch (IOException e) {
logger.error(e.getMessage(), e);
}
finally{
if(agent != null){
// Disconnect PCF agent.
logger.info("Disconnecting PCFAgent for queue manager " + agent.getQManagerName());
try {
agent.disconnect();
logger.info("Disconnected.");
}
catch (MQException e) {
logger.error(e.getMessage(), e);
}
}
}
return new ArrayList(queueNames);
}
public static List getMessagesParameterMap(MQMessage[] responses) {
List messages = new ArrayList(responses.length);
logger.info("Received reply from PCFAgent of size (" + responses.length + ")");
try {
for (int i = 0; i < responses.length; i++) {
MQCFH cfh = new MQCFH(responses[i]);
// Check the PCF header (MQCFH) in the response message
if (cfh.reason == 0) // Case no errors were reported.
{
// Iterate through a list of parameters of each response.
Map parameters = new HashMap();
for (int j = 0; j < cfh.parameterCount; j++) {
PCFParameter p = PCFParameter.nextParameter(responses[i]);
parameters.put(new Integer(p.getParameter()), p.getValue());
}
messages.add(parameters);
}
else {
logger.info("Failure to read parameters due to: " + cfh);
// Walk through the returned parameters describing the error
for (i = 0; i < cfh.parameterCount; i++) {
logger.info(PCFParameter.nextParameter(responses[0]));
}
}
}
}
catch (MQException mqe) {
logger.error(mqe.getMessage(), mqe);
}
catch (IOException ioe) {
logger.error(ioe.getMessage(), ioe);
}
return messages;
} _________________ Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex |
|
Back to top |
|
 |
klamerus |
Posted: Thu Apr 07, 2005 2:24 am Post subject: |
|
|
 Disciple
Joined: 05 Jul 2004 Posts: 199 Location: Detroit, MI
|
Thanks for the long sample. I'll need to see if I can accomlish the same in VB or VB.Net as described in the other posting. Java is a no-no at my current client. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Apr 07, 2005 12:53 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20763 Location: LI,NY
|
Look at .NET. This means you can still use all the Java objects.
Just instantiate them in .NET (J#)
Enjoy  |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|