What will happen when ResultSet is not closed?



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

Post New Answer

More JDBC Interview Questions

can we define indexes on a foreign key? Explain pros and cons?

1 Answers  


What does the jdbc resultsetmetadata interface?

0 Answers  


What class.forname will do while loading drivers of jdbc?

0 Answers  


Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?

0 Answers  


What do you mean by metadata and why we are using it?

0 Answers  






How warnings are retrieved in JDBC?

1 Answers  


Stored procedure purpose?

2 Answers  


How do I find ojdbc jar version?

0 Answers  


Why do I have to reaccess the database for Array, Blob, and Clob data?

0 Answers  


What is an outer join?

3 Answers   Infogain,


Where can I find info, frameworks and example source for writing a JDBC driver?

0 Answers  


What is DML?

0 Answers  


Categories