读书人

tomcat 连接池的 Stmt 是不是不用关闭

发布时间: 2012-01-26 19:40:46 作者: rapoo

tomcat 连接池的 Stmt 是不是不用关闭啊!还是关了rs Stmt 就自动关闭了啊

CallableStatement cStmt
finally {
if (rs != null) {
rs.close();
rs = null;
}
if (sqlStmt != null) {
//cStmt.close(); 这就是100句
//cStmt=null;
}

Pool.close(conn);
}


如果不注释掉

就提示


java.sql.SQLException: Already closed.
at (testJsp.java:100)



[解决办法]
不好意思,我的写反了,晕死

读书人网 >J2SE开发

热点推荐