C3P0 data Source Definition

Source: Internet
Author: User

<!--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--&lt ;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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.