Author |
Message
|
mkurley |
Posted: Thu Jun 19, 2003 7:46 am Post subject: Client Connection Pool - netstat |
|
|
Novice
Joined: 27 Mar 2002 Posts: 13
|
We wrote a connection pool to hold the QueueConnection objects that are created. Users of the pool ask for a connection then open up a QueueSession and QueueSender. After the message is sent it closes the queueSession and queueSender. Then it returns the QueueConnection to the pool. The pool is working correctly because the connections are reused.
I notice that on the machine the client connects to, it opens a new socket for each message it sends. If I run the command "netstat -a" the connections to port 1414 keep increasing. From my testing I noticed that these ports are only closed when the close method is called on the QueueConnection. Thus I don't see anyway we can pool these client connections.
Is it possible to pool client connections? Am I doing something wrong?
For forward all comments and suggestions.
Thanks
-mark |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Jun 19, 2003 8:05 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
What version of the MQ code are you running? There were some fixes put into some of the later (after CSD4) CSDs for MQ 5.2 that were in the area of freeing up connections. |
|
Back to top |
|
 |
mkurley |
Posted: Thu Jun 19, 2003 9:44 am Post subject: |
|
|
Novice
Joined: 27 Mar 2002 Posts: 13
|
We are running version 5.2.0.5. Were the fixes in a CSD later than 5? |
|
Back to top |
|
 |
mkurley |
Posted: Fri Jun 20, 2003 5:44 am Post subject: |
|
|
Novice
Joined: 27 Mar 2002 Posts: 13
|
I just upgraded to version 5.2.0.6 and I am still experiencing the same problem. Are there any new mq jar files that I need to use on the client side? I looked in the /usr/mqm/java/lib directory and it doesn't look like these jar files have been updated.
Please advise.
Thanks
-mark |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jun 20, 2003 5:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In 5.2 the java classes are part of MA88, and not the base product.
So if you need to update your java classes for 5.2, you need to get the most recent version of MA88. |
|
Back to top |
|
 |
dtauzell |
Posted: Fri Jun 27, 2003 10:21 am Post subject: |
|
|
Apprentice
Joined: 23 May 2002 Posts: 37
|
I implemented a connection pool by pooling QueueSessions. There is one QueueConnection in the pool. So you check out a pair, create your QueueSender, close the QueueSender and the check the connection/session back in.
In addition, the pool creates a queue subscriber that listens on a "monitor" queue. It also registers a jmx exception listener. That way if the connection dies it gets notified and can remove all cached sessions.
-Dave |
|
Back to top |
|
 |
|