<!--C3P0 Connection pool configuration--<bean id= "Testdatasource" class= "com.mchange.v2.c3p0.ComboPooled DataSource "destroy-method=" Close > <!--database driver-<property name= "DRIVERCL "Value=" ${db.driver.class} "/> <!--connection URL string--<property name=" Jdbcurl "value=" $ {Db.url} "/> <!--Connect user name--<property name=" user "value=" ${db.username} "/> <!--connection password--<property name= "password" value= "${db.password}"/> <!- -The connection pool is initialized with a number of connections of 5--<property name= "Initialpoolsize" value= "5"/> <!--allow minimum number of connections to 5 --<property name= "Minpoolsize" value= "5"/> <!--allows maximum connections of 20--< Property Name= "Maxpoolsize" value= "/> <!--allow connection pooling to generate up to 100 PreparedStatement objects--< ;p roperty name= "maxstatements "value="/> <!--connection valid time, the connection is not used for more than 3,600 seconds, then the connection is discarded--<property name= "Maxidletim E "value=" 3600 "/> <!--when the connection is exhausted, the new connection stepping value is 2--and <property name=" Acquireincrement "va Lue= "2"/> <!--get a connection failure and try 10 more times, then fail returns daoexception exception--<property name= "Acquireretrya Ttempts "value="/> <!--get the next connection with a minimum interval of 600 milliseconds to help improve performance-<property name= "Acquireret Rydelay "value="/> <!--Check the validity of the connection, here the little brother does not know what it means-<property name= "Testconnectio Noncheckin "value=" true "/> <!--Check Connection object status every 1200 seconds--<property name=" Idleconnectiont Estperiod "value="/> <!--get a new connection with a time-out of 10000 milliseconds and <property name= "Checkouttimeo UT "value=" 10000 "/> </bean>
C3P0 data Source Definition