users@glassfish.java.net

Re: JMS connection pool problem / bug?

From: <glassfish_at_javadesktop.org>
Date: Fri, 07 Nov 2008 04:25:35 PST

Okay, after reading my way through tonnes of doc's, the TCP sockets being opened on the client & the connections shown via the imqcmd command didn't tally with what the doc's said they should. All as explained in earlier posts.

After lots of experimentaion the solution seems to be setting the 'initial & max connection pool' to a value of 1. All else stays the same.
This set-up gives feedback (via imqcmd) that each client (message sender) gets 2 connections to the message handler / queue and each connection gets 2 threads allocated.

So, for example if init connection pool size is 1 & max pool size is 4, and 5 clients start sending messages, then imqcmd reports 10 new connections made and 20 new threads become active. I guess these 10 connections get farmed through the max 4 jms connections in the connection pool!?!??

Anyway, at least things are now starting to become a little more predictable.

However, all this seems to be against the whole point of my understanding of connection pools!

I thought the whole point of having pools was so that ANY number of clients should be able to 'connect' TO THE POOL and thereby the server would never run out of resources!?!?
IE. if the pool was set up so that the init size was 8 and the max was 32, then when a client connects it gets a single connection to / from the pool. If 50 million clients try to connect, each only get one connection from a max pool size of 32. So the sever would only ever have a max of 32 connection and so 64 threads being active (given that each connection requires 2 threads per connection)!?!?

Any comments from anyone would be great.

Pete
[Message sent by forum member 'siggyuke' (siggyuke)]

http://forums.java.net/jive/thread.jspa?messageID=315447