2 Replies Latest reply on Mar 16, 2002 7:17 PM by phamlen

    Available Connections in Pool

    James Cook Newbie

      Is there a way to tell how many database transactions are 'out of the pool' at any given time? I am trying to ensure all connections are properly returned to the pool after a suite of tests execute.

        • 1. Re: Available Connections in Pool
          David Jencks Master

          Not programatically right now AFAIK. However, I think it is a good idea to make it available as a jmx attribute. I'll see about adding it in jboss 3.


          • 2. Re: Available Connections in Pool
            phamlen Newbie

            Well, I have the same problem and I've done quite a hack to get around it. We turn on Connection Logging, and get INFO messages from PostgresDS indicating when connections are checked out and returned. In that string, there is a [X/Y/Z] number (eg, [4/8/10]) where X represents the number of used (checkedout) connections, Y represents the total connections, and 10 indicates the maximum size of the pool.
            So we run our tests, then parse the log to ensure that the last PostgresDS message reads appropriately.