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.
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.