Effects of not closing a ResultSet

Discussions

General J2EE: Effects of not closing a ResultSet

  1. Effects of not closing a ResultSet (2 messages)

    I execute a Statement which i get from a hibernate Sesssion using connection(). In my servlet I close the hibernate session after every unit of work. Is there any reason for me to close the ResultSet and if not what are the effects. I havent seen any performance hits by not closing the ResultSet or Statement
  2. It will take time to reach Memory leaks which is not has immidiate effect.
  3. run out of cursors[ Go to top ]

    Not closed ResultSet is basically cursor in DB. So, unless you or framework you using close it explicitly it will stay open until ResultSet object will be garbage collected = good chances run out of cursors.