What will happen when ResultSet is not closed?
Answer Posted / sekhar reddy
It also depends on the JDBC driver and it would also not happen if it is a pooled connection. A pooled connection is returned to the pool and would only actually be closed later when its lifetime has expired. In the meanwhile easily more than thousands statements and/or resultsets might have been opened and left unclosed.
However that presumes
- That the driver does do that.
- That the connection close actually cleans the resources.
There was an Oracle driver that did not do the second.
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
explain about special characters?
Why do we use jdbc in java?
Explain the various types of locking system in jdbc?
What is the role of class.forname while loading drivers?
How does a custom RowSetReader get called from a CachedRowSet?
Is jdbc part of j2ee?
Does jdbc require oracle client?
What is dburl?
Differentiate between stored procedure and functions?
What does executeupdate return in jdbc?
Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?
Where is ojdbc14 jar located?
What is a statement?
What's the benefit for specifying constraints like not null, primary key explicitly instead of specifying it against the column ?
What is the purpose of the jdbc resultset interface?