java数据库连接的优化过程

java数据库连接的优化过程_第1张图片java数据库连接的优化过程_第2张图片


<c3p0-config>
    
    <default-config>
        
        <property name="jdbcUrl">jdbc:mysql://localhost:3306/test1property>
        <property name="driverClass">com.mysql.jdbc.Driverproperty>
        <property name="user">rootproperty>
        <property name="password">rootproperty>

        
        <property name="acquireIncrement">3property>
        
        <property name="initialPoolSize">10property>
        
        <property name="minPoolSize">2property>
        
        <property name="maxPoolSize">10property>

    default-config>
 c3p0-config>
//获取Connection对象
ComboPooledDataSource dataSource = new ComboPooledDataSource(); 
Connection conn = dataSource.getConnection();

你可能感兴趣的:(java中的优化机制)