1 Reply Latest reply on Jul 9, 2004 10:10 PM by Adrian Brock

    Question about min-pool-size

    David Heinecke Newbie

      Please forgive me in advance for sounding like a total JBoss noob...

      In the JBossManagedConnectionPool MBean, what is the significance of the MinSize attribute? The MaxSize attribute seems to be pretty straightforward: Only allow, at most, N connections to the datasource. The MinSize setting, while seeming to be obvious on the surface, becomes a little ambigious once you start to think about it.

      For example, what does a min-pool-size setting of 0 mean? Does it mean that there will be no pooling of database connections at all? That each request for a connection will require a new one to be constructed? What about when a connection is released (closed) by the application? Does it go back to the pool (even if it violates the minimum size) or does it get hard-closed right away? What part does the IdleTimeoutMinutes setting play in determining when a connection gets closed if the count of connections is above the minimum?

      Any help in getting me set straight on this issue would be greatly (and humbly) appreciated!

      David Heinecke

        • 1. Re: Question about min-pool-size
          Adrian Brock Master

          You have a bizarre notion of minumum.

          Maximum == no more than this number of connections
          Minumum == no less than this number of connections

          Caveat: minumum only applies after the resource is used, i.e. an unused resource
          means no connections regardless of minumum.

          idle-timeout-millis closes unused connections after that length of time, but connections
          are recreated to refill to the minumum.