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 » how to browse all message in a queue by using java

Post new topic  Reply to topic
 how to browse all message in a queue by using java « View previous topic :: View next topic » 
Author Message
christian
PostPosted: Mon Sep 16, 2002 4:40 pm    Post subject: how to browse all message in a queue by using java Reply with quote

Newbie

Joined: 11 Sep 2002
Posts: 5

is there any Example code to download?

thx
Back to top
View user's profile Send private message
christian
PostPosted: Mon Sep 16, 2002 5:37 pm    Post subject: i take it Back , but a new Question Comes Reply with quote

Newbie

Joined: 11 Sep 2002
Posts: 5

now i know how to browse all messages in a queue,
but a new Question comes:

when i use code like below:

while ( true ) {
try{
com.ibm.mq.MQGetMessageOptions gmo = new com.ibm.mq.MQGetMessageOptions();
mq.get(mqmessage,gmo);
}
catch (Exception e){
System.out.println( "There is no more Message" )
}
}



When there is no message in the queue , it will always print a message "Unable to load message catalog -mqji"

How can i browse all the messages in a queue , but the message above won't be printed?

thx
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Sep 16, 2002 9:15 pm    Post subject: Reply with quote

Jedi Knight

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

If you put the $MQ$/java/lib in your classpath then MQ will pick up the properties file and print out "2033 No Message Available" (roughly speaking).

If you want to entirely get ridden of MQ's pretty messages then code the following:
Code:
MQException.log = null;


later
Roger...
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
christian
PostPosted: Tue Sep 17, 2002 9:57 pm    Post subject: Thank u Reply with quote

Newbie

Joined: 11 Sep 2002
Posts: 5

the way u told me may be so rough

is there any other way to work it out?
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Tue Sep 17, 2002 10:02 pm    Post subject: Reply with quote

Jedi Knight

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

Uh??
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
lordnecron
PostPosted: Thu Sep 19, 2002 1:13 am    Post subject: This forum is pretty cool Reply with quote

Novice

Joined: 15 Jul 2002
Posts: 12
Location: France, paris

I was going to ask the same question about "Unable to load message catalog - mqji"...
So Roger gave me the solution ! Thanks Roger !
Julien
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » how to browse all message in a queue by using java
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.