Tuesday, 21 February 2012

C3P0 ConnectionPool: How To configure

C3P0 - is connection pool,  connection pool is a cache of database connections maintained, so that the connections can be reused when future requests to the database are required. 

The main question is how to cofigure it, because default values are not perfect. First of all I found oficial doc with description of the values. Next I found this one C3P0 ConnectionPool Configuration Rules of Thumb. After some performance testing of my application, I can confirm that configuring like in this article, can greatly increase your performance, in my case it was about twice. So bellow text of this article -  "