Configuration of the DBCP connection pool

Source: Internet
Author: User

<!--data source 1--<bean id= "DataSource"class= "Org.apache.commons.dbcp.BasicDataSource"Destroy-method= "Close" > <property name= "driverclassname" value= "Com.mysql.jdbc.Driver"/> <property name = "url" value= "Jdbc:mysql://192.168.0.109:3306/test?useunicode=true&characterencoding=utf-8"/> < Property name= "username" value= "root"/> <property name= "password" value= "root"/> <!--maxactive: Maximum number of connections-<property name= "maxactive" value= "/> <!--minidle: Minimum idle connection--<prop Erty name= "Minidle" value= "5"/> <!--maxidle: Maximum idle connection--<property name= "Maxidle" value= "/&gt"        ;        <!--initialsize: Initialize Connect--<property name= "initialsize" value= "" "/> < Whether the connection is printed when!--is compromised <property name= "logabandoned" value= "true"/> <!--removeabandoned: Auto Recycle timeout connection--<pro Perty name= "removeabandoned" value= "true"/> <!--removeabandonedtimeout: Time-out (in seconds)--<prop Erty name= "RemoveabandoneDtimeout "value="/> <!--maxwait: Timeout wait time in milliseconds 1000 equals 60 seconds--<property name= "maxwait" value= "10 /> <!--The time value, in milliseconds, that sleeps during the idle connection collector thread run. --<property name= "Timebetweenevictionrunsmillis" value= "10000"/> <!--checked at each idle connection collector thread (if any) run-time Number of connections-<property name= "Numtestsperevictionrun" value= "ten"/> <!--1000 * 60 * 30 connections remain idle in the pool without being empty Idle connection Collector Thread--<property name= "Minevictableidletimemillis" value= "10000"/> <property name= "ValidationQu ery "value=" Select Now () from DUAL "/> </bean>

Reference Path: http://blog.csdn.net/fairyhawk/article/details/7565391

Configuration of the DBCP connection pool

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.