疑惑:ResultSet.close()后,生成 ResultSet 对象的 Statement 对象和 Connection 对象不调用close,连接池会继续占用吗?
如题: 
 我只调用ResultSet的close()方法,在刷新页面一定次数后,页面就打不开了,tomcat报连接池满.   
 JavaAPI文档里说:立即释放此   ResultSet   对象的数据库和   JDBC   资源,而不是等待该对象自动关闭时发生此操作。   
 因为逻辑层只返回一个ResultSet给Servlet,得不到Statement和Connection,只能写.但麻烦! 
 小弟不明...按文档说的,只关了rs不就可以了么?
------解决方案--------------------这样不可以的吧。。。。
------解决方案--------------------这样肯定不行,资源打开不释放当然会占用资源啦!statement,connection都要关闭!
------解决方案--------------------连接池耗尽,需要关闭connection,建议有finally{ 
   conn.close(); 
 }
------解决方案--------------------try{ 
   .... 
   rs.close(); 
   statement.close(); 
   connection.close(); 
 }catche(Exception e){ 
   .... 
 }finally{ 
   if(rs!= null)rs.close(); 
   if(statement!=null)statement.close(); 
   if(connection!=null)connection.close(); 
 }