What will happen when ResultSet is not closed?
Answer / 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 |
What is a PreparedStatement?
what is call level interface?
What is JDBC?
3 Answers Akamai Technologies,
What is jdbc and jdbc drivers?
Why should we close database connections in java?
How many types of jdbc drivers are available?
What are the factors that the jdbc driver performance depends upon?
How many types of jdbc drivers are there?
what is the difference between SENSITIVE and INSENSITIVE?
What is jdbc thin client?
What is jdbc oracle thin?
What is jdbc driver in java?