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 » regarding the Open Input Count

Post new topic  Reply to topic
 regarding the Open Input Count « View previous topic :: View next topic » 
Author Message
hrishi
PostPosted: Mon Jul 10, 2006 10:27 pm    Post subject: regarding the Open Input Count Reply with quote

Newbie

Joined: 27 Apr 2006
Posts: 5

hi,

I am trying to put messages on a Queue (on a remote machine) from a servlet and get back the messages from the queue..
A thread continuously creates a connection to the queue , puts the message and closes the connection for each message...
To stop putting messages, this thread is stopped...

For receiving the messages, another connection is created, QueueReceiver is registered with a Listener, and then the connection started.... This increments the "open input count" for the queue. (this is working fine- putting and getting of messages...)

To stop the receiving of messages, the reference to the registered listener object is made null, connection is stopped and its ref is made null... The receiving of messages is stopped , But still the MQ Explorer shows that the "open input count" for the queue remains incremented even after trying to stop the connection...

what could be the reason for this? how can i ensure that the "open input count" does not go on increasing..?

Thanks in advance ,
hrishi
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jul 11, 2006 3:33 am    Post subject: Reply with quote

Grand High Poobah

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

Did you close the session? Did you close the connection?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Jul 11, 2006 3:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Also, you're much better off implementing a Singleton that holds a small pool of MQ connections, and not creating a new one for every HTTP session. Or, if you're really in J2EE land, using JMS and a JNDI QCF.

Design wise, treat an MQ Connection like a Database connection - expensive to establish, so use a cache. Designwise, do *not* treat an MQ Queue like a database table.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
hrishi
PostPosted: Wed Jul 12, 2006 1:42 am    Post subject: Reply with quote

Newbie

Joined: 27 Apr 2006
Posts: 5

thanks for the replies!

i had closed the connection but not closed the session....
now its working fine...

thanks for the design guidelines!! i am not really in j2ee land - i'll try using singleton that holds a pool of MQ connections...

Thanks agian, fjb_saper & jefflowrey

-hrishi
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 » regarding the Open Input Count
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.