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
What does the connection object represents?
What protocol does jdbc use?
What is data source in java?
How many categories of jdbc drivers are there?
How can you make a connection?
How does jdbc driver work?
Explain jdbc savepoint?
Which interface handles transaction management in jdbc?
How to use JDBC API to call Stored Procedures?
Why do we need jdbc driver?
Is oracle client required for jdbc connection?
What is difference between odbc and jdbc?
Describe the steps needed to execute a sql query using jdbc.
Differentiate between stored procedure and functions?
Is jdbc database independent?