Cosmin Cremarenco <[EMAIL PROTECTED]> wrote: > I agree that the Statement and the PreparedStatement must be > explicitly closed. But what about the ResultSet. How come the following > piece of code works? > ...
According to the SDK v1.4.1 API documentation for the ResultSet interface: "A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results." So, assuming that Oracle and other have implemented the interface correctly, which I presume they have, there should be no need to close the ResultSet if the Statement is closed. There should not be a resource leak. --- Alan Meyer AM Systems Randallstown, MD U.S.A. =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com