连接池占用资源问题
各位大哥,本人最近用连接池做网站,但发现连接池相当占内存,不知道是什么原因。望各位大哥指点。告诉些最可能出现的原因,小弟感激不尽。我先给出个我调用连接池的代码:public ResultSet queryModelmsg1(){
DBConnectionManager db = DBConnectionManager.getInstance();
Connection conn = db.getConnection("idb");
ResultSet rs = null;
String query_sql = "select b.id as id,b.photo as photo,b.model as model,a.sjgprice as sjgprice,a.lhprice as lhprice " +
"from quote as a,model_msg as b where a.model=b.model and b.isRec=1 order by a.Updateprice desc";
try {
PreparedStatement ps =conn.prepareStatement(query_sql);
rs=ps.executeQuery();
}
catch (Exception e) {
db.freeConnection("idb",conn);
e.printStackTrace();
}
db.freeConnection("idb",conn);
return rs;
}
不知道这样调用有什么不妥么?