连接池异常
You can't perform any operations on this connection. It has been automatically closed by Proxool for some reason (see logs). 在网上查询是可能查询时间过长,导致数据链接被回收不可用,因此要修改数据库配置maximum-active-time参数,关于其默认值见http://proxool.sourceforge.net/properties.html,及http://proxool.sourceforge.net/api-dev/org/logicalcobwebs/proxool/configuration/PropertyConfigurator.html,下面是proxool配置文件如下:
<bean id="dataSource"
class="org.logicalcobwebs.proxool.ProxoolDataSource" destroy-method="reset">
<property name="driver">
<value>${jdbc.driver}</value>
</property>
<property name="driverUrl">
<value>${jdbc.url}</value>
</property>
<property name="user">
<value>${jdbc.username}</value>
</property>
<property name="password">
<value>${jdbc.password}</value>
</property>
<property name="houseKeepingTestSql">
<value>select sysdate from DUAL</value>
</property>
<property name="testBeforeUse">
<value>false</value>
</property>
<property name="maximumConnectionCount">
<value>60</value>
</property>
<property name="minimumConnectionCount">
<value>20</value>
</property>
<property name="delegateProperties">
<value>
user=${jdbc.username},password=${jdbc.password}
</value>
</property>
<property name="simultaneousBuildThrottle">
<value>10</value>
</property>
<property name="maximumActiveTime"><value>900000</value></property>
<!自动侦擦各个连接的状态时间间隔(单位毫秒)侦擦到空闲的连接马上回收,超时毁,默认30秒-->
<property name="houseKeepingSleepTime"><value>20000</value></property>
</bean>
---------------------
作者:zxh87
来源:CSDN
原文:https://blog.csdn.net/zxh87/article/details/8179030
版权声明:本文为博主原创文章,转载请附上博文链接!