日期:2014-05-16 浏览次数:20462 次
org.hibernate.exception.JDBCConnectionException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) . Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error: ** BEGIN NESTED EXCEPTION ** com.mysql.jdbc.CommunicationsException MESSAGE: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: Broken pipe STACKTRACE: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) ** END NESTED EXCEPTION **
//set to 'SELECT 1' validationQuery = "SELECT 1" //set to 'true' testWhileIdle = "true" //some positive integer timeBetweenEvictionRunsMillis = 3600000 //set to something smaller than 'wait_timeout' minEvictableIdleTimeMillis = 18000000 //if you don't mind a hit for every getConnection(), set to "true" testOnBorrow = "true"
//获取connnection时测试是否有效 testConnectionOnCheckin = true //自动测试的table名称 automaticTestTable=C3P0TestTable //set to something much less than wait_timeout, prevents connections from going stale idleConnectionTestPeriod = 18000 //set to something slightly less than wait_timeout, preventing 'stale' connections from being handed out maxIdleTime = 25000 //if you can take the performance 'hit', set to "true" testConnectionOnCheckout = true