Permalink
Browse files

Looks like two of those should still be nulled, but two should not be.

  • Loading branch information...
1 parent 47d74c8 commit 283ffd30e2174ed5ba1389c6ef7c94ebe11e868b @timf timf committed Jun 8, 2010
@@ -1878,7 +1878,6 @@ public void replaceResourcepools(Hashtable pools)
/**
* For now, only available_memory is replaceable.
- * @param name name
* @param entry pool entry
*/
public void replaceResourcepoolEntry(ResourcepoolEntry entry)
@@ -1994,11 +1993,12 @@ public synchronized Hashtable currentResourcepools(boolean cachedIsFine)
} while (rs.next());
- // rs = null;
- // rs2 = null;
- // pstmt = null;
- // pstmt2 = null;
- // is that needed? (in finally they're closed)
+ // We do not want finally to clean these up, but need the finally protection
+ // because of the while loop. Once out of the while loop, these _are_ closed
+ // so make them null so they are not re-closed which causes
+ // "SQLException: Already closed"
+ rs2 = null;
+ pstmt2 = null;
this.resourcepools = pools;

0 comments on commit 283ffd3

Please sign in to comment.