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 » Custom java application getting 2017 error after 255 browses

Post new topic  Reply to topic
 Custom java application getting 2017 error after 255 browses « View previous topic :: View next topic » 
Author Message
edmondh
PostPosted: Fri Mar 30, 2007 6:47 am    Post subject: Custom java application getting 2017 error after 255 browses Reply with quote

Novice

Joined: 17 Feb 2006
Posts: 14
Location: London

Hi

I have written a custom application that reads message from queues.

Before I go a get on message I first have a peep at message. So first I access queue with browse options,
MQC.MQOO_BROWSE
I browse message and close queue.
(I should probably leave queue open & reause connection)

Ok, so when a message exists in queue then I do a GET & my other processing.

However my application ALWAY errors out with a MQ 2017 (MQRC_HANDLE_NOT_AVAILABLE) reason code. It always happens after 255 browses.

Has anyone experienced this before?
Is there some property on my queue queueManager I need to set.

here is most of code for my 'browse' method

Code:
MQQueueManager mgr = MQResourceManager.getInstance()
                                                  .getQueueManager(qMgrName);
MQQueue browseQ = mgr.accessQueue(qName,
                                              MQC.MQOO_BROWSE,
                                              null,
                                              null,
                                              null);
MQMessage browseMessage = new MQMessage();
MQGetMessageOptions gmo = new MQGetMessageOptions();
            gmo.options = MQC.MQGMO_BROWSE_FIRST  | MQC.MQGMO_WAIT  | MQC.MQGMO_LOGICAL_ORDER | MQC.MQGMO_ALL_MSGS_AVAILABLE;

int receiverBrowseWaitInterval = new Integer (PropertyManager.getInstance()
                                                                        .getProperty("receiverBrowseWaitInterval")).intValue();
 
gmo.waitInterval = receiverBrowseWaitInterval;
            log.log(Level.FINE, "Receiver browse wait interval is : "
                    + receiverBrowseWaitInterval);
            // retrive message
            browseQ.get(browseMessage, gmo);
            browseQ.close();

_________________
Thank you for your time
Ed
Back to top
View user's profile Send private message
jsware
PostPosted: Fri Mar 30, 2007 7:12 am    Post subject: Re: Custom java application getting 2017 error after 255 bro Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

edmondh wrote:
However my application ALWAY errors out with a MQ 2017 (MQRC_HANDLE_NOT_AVAILABLE) reason code. It always happens after 255 browses.

Sounds like you're hitting the max handles setting for the queue manager. Are you closing the queue you are getting (rather than browsing) from?

I would suggest you apply the latest fix pack to MQ if you are at CSD08/9/10 or 11 as there were lots of java related memory leak problems.

Why are you using separate queue handles to browse and then get the message? You can use the same one. Check out the MQGMO_MSG_UNDER_CURSOR option. You might also want to check out http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzal.doc/browsmq.htm for details on browsing messages on a queue.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
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 » Custom java application getting 2017 error after 255 browses
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.