bug fixed : after real connection closed, closePoolableStatementError

This commit is contained in:
wenshao
2011-12-07 11:12:05 +08:00
parent 2d91292d3a
commit aad9961a71
@@ -81,6 +81,10 @@ public class PoolableConnection implements PooledConnection, Connection {
}
void closePoolableStatement(PoolablePreparedStatement stmt) throws SQLException {
if (this.isClosed()) {
return;
}
PreparedStatement rawStatement = stmt.getRawPreparedStatement();
try {
@@ -88,6 +92,10 @@ public class PoolableConnection implements PooledConnection, Connection {
} catch (SQLException ex) {
LOG.error("clear parameter error", ex);
}
if (holder == null) {
return;
}
if (holder.isPoolPreparedStatements()) {
stmt.clearResultSet();