开发者

"Connection reset on log" from Commons DBCP

I am using Spring, Hibernate for CRUD operations and using Apache 'BasicDataSource' for connection pooling Now the problem is when use below following configuration in datasource

    <property name="maxActive" value="100"/>
    <property name="maxWait" value="10000"/>
    <property name="removeAbandoned" value="true"/>
    <property name="removeAbandonedTimeout" value="60"/>
    <property name="logAbandoned" value="true"/>
    <property name="maxIdle" value="10"/>

than after using all connections I m getting Error of "Connection reset on log" but it takes long time to get back.

And if I m removing following lines from datasource

   <property name="removeAba开发者_JAVA技巧ndoned" value="true"/>
    <property name="removeAbandonedTimeout" value="60"/>
    <property name="logAbandoned" value="true"/>

And adding below line to SessionFactory(hibernateProperties)

    <prop key="hibernate.connection.release_mode">after_statement</prop>

than i getting no error on console but the problem is It uses the connection and close as soon as it completes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜