Subject | Re: problem with Connection-Pooling |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-05-29T08:49:18Z |
> Are you really shure about getConnectionCount() ?I think I am, I wrote that code :). Code of the getConnectionCount():
> When i start my application with minsize = 5 than getConnectionCount()
> returns 5, with minsize = 4 getConnectionCount() returns 4 at the
> beginning, when not using my application for some time
> getConnectionCount() decreases, so i thought getConnectionCount()
> returns the current used connections. (unfortunatly there is no
> api-doc for getConnectionCount())
public int getConnectionCount() {
return getPool().getFreeSize();
}
There's javadoc for getFreeSize(). When you start your application,
number of free connections in the pool is 5. Then if you take one
connection, it will be 4. It is strange that number of connectios
decreeses. If you are sure that there's no code "eating" the
connections, it can also be a bug in pool, when it releases idle
connections even below minPoolSize margin. I will check it too.
Roman