日期:2014-05-16 浏览次数:20476 次
?
testOnBorrow默认为true, 要设置为false. ?若设置validationQuery则对性能影响比较大.
testWhileIdle默认为false,设置为true.并设置validationQuery
maxIdle最好设置为与maxActive一样。
initialSize与minIdle按业务要求配置,一般都要配置。
timeBetweenEvictionRunsMillis默认为-1.设置一定数值300000
numTestsPerEvictionRun默认是3, 这个值要调大点maxActive的一半较好。?
?
以下apache dbcp的配置项
?
username | The connection username to be passed to our JDBC driver to establish a connection. |
password | The connection password to be passed to our JDBC driver to establish a connection. |
url | The connection URL to be passed to our JDBC driver to establish a connection. |
driverClassName | The fully qualified Java class name of the JDBC driver to be used. |
connectionProperties | The connection properties that will be sent to our JDBC driver when establishing new connections.? Format of the string must be [propertyName=property;]*? NOTE?- The "user" and "password" properties will be passed explicitly, so they do not need to
免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
|