A couple of interesting options to point out are those dealing with the validity of idle connections in the pool:
testWhileIdle (default false)
The indication of whether objects will be validated by
the idle object evictor (if any). If an object fails to
validate, it will be dropped from the pool. NOTE - for
a true value to have any effect, the validationQuery
parameter must be set to a non-null string.
timeBetweenEvictionRunsMillis (default -1)
The number of milliseconds to sleep between runs of the
idle object evictor thread. When non-positive, no idle
object evictor thread will be run.
numTestsPerEvictionRun (default 3)
The number of objects to examine during each run of the
idle object evictor thread (if any).
minEvictableIdleTimeMillis (default 1000 * 60 * 30)
The minimum amount of time an object may sit idle in
the pool before it is eliga
A good blog post on Apache DBCP can be found on Roy's Musings under Gotchas with DBCP.
For a comparison of Apache DBCP with another connection pool see Vigil Bose's Blog.
Also check out BoneCP for a connection pool specifically written to be fast.
No comments:
Post a Comment