4
回答
c3p0 不时的出现 You can't operate on a closed Connection (statement,或者result)!!! 或者是
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   
Caused by: java.sql.SQLException: You can't operate on a closed Connection!!!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)

at com.mchange.v2.c3p0.impl.NewProxyConnection.createStatement(NewProxyConnection.java:76)

连接 无关闭, 已统一开启和 关闭, 在getstatement.exec的时候  有的时候会出现 以上情况

配置如下

driverClass=org.gjt.mm.mysql.Driver
jdbcUrl=jdbc:mysql://127.0.0.1:3306/frame
user=root
password=ssssss
minPoolSize=2
maxPoolSize=10
#default 3, init connection
initialPoolSize=2
#default 3, one time get connection   
acquireIncrement=2
maxStatements=10
checkoutTimeout=5000
acquireRetryAttempts=30
acquireRetryDelay =10000
maxIdleTime = 600000
maxIdleTimeExcessConnections=5
idleConnectionTestPeriod=60000

举报
panmingguang
发帖于5年前 4回/4K+阅
顶部