I am trying to release the space used by JDBC ResultSet by closing it and setting the value to null in the finally block. Ex:
try{
//some query executed here and resultset used to get the values from the db
}catch(Exception exp){
//log exception here
}finally{
//close resultset
if(rs != null){
rs.close();
rs = null;
}
}
When I check for the number of open ResultSet in YourKit, even though all the resultsets are closed and set to null, instead of showing 0 resultset open YourKit is showing some non zero value for open resultsets. Can anyone please help me here to make the number of open resultset 0.
Thanks in advance. Tanmayee