Hibernate_c3p0_警告_WARN Both hibernate-style property 'hibernate.c3p0.max_size'

Hibernate_c3p0_警告_WARN  Both hibernate-style property 'hibernate.c3p0.max_size'

 

原因:看警告也可以大概知道,配置信息写重复了。但是我们会想,我就有一个hibernte配置文件啊!

 

        <property name="c3p0.timeout">600</property>
        <property name="c3p0.min_size">5</property>
        <property name="c3p0.max_size">25</property>
        <property name="c3p0.acquire_increment">2</property>
        <property name="c3p0.acquireRetryDelay">1000</property>
        <property name="c3p0.acquireRetryAttempts">5</property>
        <property name="c3p0.max_statements">0</property>
        <property name="c3p0.max_statements_per_connection">0</property>
        <property name="hibernate.c3p0.idle_test_period">120</property>
        <property name="c3p0.validate">true</property>
        <property name="c3p0.maxIdleTimeExcessConnections">60</property>

 

可以看出,c3p0在Hibernate中配置有两种形式,这样也可以:

 

        <property name="hibernate .c3p0.timeout">600</property>
        <property name="hibernate.c3p0.min_size">5</property>
        <property name="hibernate.c3p0.max_size">25</property>
        <property name="hibernate.c3p0.acquire_increment">2</property>
        <property name="hibernate.c3p0.acquireRetryDelay">1000</property>
        <property name="hibernate.c3p0.acquireRetryAttempts">5</property>
        <property name="hibernate.c3p0.max_statements">0</property>
        <property name="hibernate.c3p0.max_statements_per_connection">0</property>
        <property name="hibernate.c3p0.idle_test_period">120</property>
        <property name="hibernate.c3p0.validate">true</property>
        <property name="hibernate.c3p0.maxIdleTimeExcessConnections">60</property>

 

原因就在这里哦~

 

 

你可能感兴趣的:(Hibernate)