|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
regarding the Open Input Count |
« View previous topic :: View next topic » |
Author |
Message
|
hrishi |
Posted: Mon Jul 10, 2006 10:27 pm Post subject: regarding the Open Input Count |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Jul 11, 2006 3:33 am Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Tue Jul 11, 2006 3:59 am Post subject: |
|
|
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 |
|
 |
hrishi |
Posted: Wed Jul 12, 2006 1:42 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|