No operations allowed after connection closed问题

碰到第一次调程序出现此问题。架构师给我说法是读写分离,一个连接对应两个物理连接,有可能晓了。
解决:

请修改一下DBCP的配置:

<property name="connectionProperties" value="useUnicode=true;characterEncoding=utf8; initialTimeout=1;
connectTimeout=1000;socketTimeout=60000;rewriteBatchedStatements=true;autoReconnectForPools=true;
maxReconnects=1;failOverReadOnly=false;roundRobinLoadBalance=true"/>



<property name="validationQuery" value ="/* ping */ select 1" />

猜你喜欢

转载自zhx870127-hotmail-com.iteye.com/blog/2066837