I am going to configure c3Po configuration for connection pooling. what does below properties mean?
preferredTestQuery : query to test the connection
testConnectionOnCheckin : above query is executed when connection is returned back to pool
testConnectionOnCheckout : above query is executed when connection is taken from pool
idleConnectionTestPeriod :
is my understanding correct?
Thanks!
Those settings control how C3P0 tests connections for timeouts. I normally use “SELECT 1;” for testing a MySQL connection, for example. There are other ways to test the connections, and some of the choices have performance implications, so I would recommend reading the documentation which is available here: http://www.mchange.com/projects/c3p0/index.html#configuring_connection_testing