DBCP configuration details

Source: Internet
Author: User

Driverclassname = com. MySQL. JDBC. Driver
Url = JDBC: mysql: /// 127.0.0.1: 3306/demo? Autoreconnect = true & useunicode = true & characterencoding = UTF-8
Username = root
Password = 3317994
# Initialize the connection. The number of initialized connections created when the connection pool is started. supported after version 1.2
Initialsize = 0
# The maximum number of active connections. If the maximum number of active connections is exceeded, the connection is released. If it is set to a negative number, the connection is unlimited.
Maxactive = 8
# Maximum number of idle connections. idle connections that have exceeded will be released. If it is set to a negative number, no limit is imposed.
Maxidle = 0
# The minimum number of idle connections is less than this. A new connection will be created. If it is set to 0, no connection will be created.
Minidle = 0
# Maximum wait time: the maximum wait time (in milliseconds) for the connection pool to wait for the connection to be returned when no connection is available. If it is set to-1, an exception is thrown.
Maxwait =-1
# SQL query: used to verify the connection obtained from the connection pool. If this parameter is specified before the connection is returned to the caller, the query must be an SQL SELECT statement and at least one row of records must be returned.
Validationquery = select 1
# Check whether the connection is retrieved from the pool. If the test fails, remove the connection from the pool and try to retrieve the other one.
# Note: If it takes effect after being set to true, the validationquery parameter must be set to a non-null string.
Testonborrow = true
# MARK whether to delete the leaked connection if they exceed the removeabandonedtimout limit.
# If it is set to true, the connection is considered to be leaked and can be deleted. If the idle time exceeds removeabandonedtimeout.
# Setting true can fix the database connection for poorly written programs without closing the connection.
Removeabandoned = false
# Timeout value for the leaked connection to be deleted, in seconds. This value is set when removeabandoned = true
Removeabandonedtimeout = 300

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.