Posted: Mon Aug 26, 2002 3:18 am Post subject: getCurrentDepth() ?
Novice
Joined: 04 Aug 2002 Posts: 12
Hello !
I am trying to get all the messages in the queue at once. For that i use getCurrentDepth to determine if there are any messages in the queue.
Here's the code:
Msg: Platon#Daniel
Unable to load message catalog - mqji
Exceptie aruncata de MQ. Completion code 2. Reason code 2033. Have a nice day !
com.ibm.mq.MQException: Completion Code 2, Reason 2033
at com/ibm/mq/MQQueue.get (MQQueue.java:493)
at GetMSGS.<init> (GetMSGS.java:35)
at GetMSGS.main (GetMSGS.java:57)
Same thing happens when I put
Code:
while (q.getQueueDepth() > 0)
{
...
}
What is the problem ? The getCurrentDepth() prints fine.
Quite simple.
The Queue is empty (2033) and you aren't handling the exception.
Wrap it in a try catch. If the reason code is 2033 dont let the program bomb out.
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