C3P0连接池参数配置


    
    <property name="acquireIncrement">3property>

    
    <property name="acquireRetryAttempts">30property>
 
    
    <property name="acquireRetryDelay">1000property>
 
    
    <property name="autoCommitOnClose">falseproperty>
 
    
    <property name="automaticTestTable">Testproperty>
 
    
    <property name="breakAfterAcquireFailure">falseproperty>
 
     
    <property name="checkoutTimeout">100property>
 
    
    <property name="connectionTesterClassName">property>
 
    
    <property name="factoryClassLocation">nullproperty>
 
     
    <property name="forceIgnoreUnresolvedTransactions">falseproperty>
 
     
    <property name="idleConnectionTestPeriod">60property>
 
     
    <property name="initialPoolSize">3property>
 
    
    <property name="maxIdleTime">60property>
 
    
    <property name="maxPoolSize">15property>
 
    
    <property name="maxStatements">100property>
 
    
    <property name="maxStatementsPerConnection">property>
 
     
    <property name="numHelperThreads">3property>
 
     
    <property name="overrideDefaultUser">rootproperty>
 
    
    <property name="overrideDefaultPassword">passwordproperty>
 
     
    <property name="password">property>
 
    
    <property name="preferredTestQuery">select id from test where id=1property>
 
     
    <property name="propertyCycle">300property>
 
    
    <property name="testConnectionOnCheckout">falseproperty>
 
    
    <property name="testConnectionOnCheckin">trueproperty>
 
    
    <property name="user">rootproperty>
 
    
    <property name="usesTraditionalReflectiveProxies">falseproperty>
复制代码

在bean.xml下的配置

复制代码
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
        <property name="driverClass" value="com.mysql.jdbc.Driver">property>
        <property name="jdbcUrl" value="jdbc:mysql:///hib_demo">property>
        <property name="user" value="root">property>
        <property name="password" value="root">property>
        <property name="initialPoolSize" value="3">property>
        <property name="maxPoolSize" value="10">property>
        <property name="maxStatements" value="100">property>
        <property name="acquireIncrement" value="2">property>
    bean>

你可能感兴趣的:(C3P0连接池参数配置)