hi, Connection.close() is not required just because they have to be garbage collected. When using the connection pool , this statement allows the pool implementation to return the connection to the pool. If not using pooling , then it allows the database to clean up the resources.
regds Ashwani ----- Original Message ----- From: "Vikramjit Singh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 14, 2002 12:27 PM Subject: Re: JDBC Connection close > yeah it does make a difference if you dont close the resultsets and > statements. If you are doing procedures in oracle, then you need not care of > closing the resultsets coz oracle does that for you. but when u do it in > java. oracle does not take care and you have to explicitly close the > resultsets and statements. Though when they are not in use, javas garbage > collection does garbage collect, the not used resultsets and statements, u > dont know when it will be garbage collected, whether it will be also or not. > but if you close them explicitly they shall garbage collected. or else most > of the times if the resultsets or statements are open you will get an error > MAXIMUM OPEN CURSORS EXCEEDED. > > Regards, > Vikramjit Singh, > Systems Engineer, > GTL Ltd. > Ph. 7612929-1031 > > > -----Original Message----- > From: Manoj Nahar [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 13, 2002 11:08 PM > To: [EMAIL PROTECTED] > Subject: JDBC Connection close > > > Hi there, > > Does it make aby difference if i close the JDBC connection without closing > all the resultsets and statements. > > I am closing connections is try catch finally. Is it possible that > connections are left open even after closing them in finally > > Manoj Nahar > http://www.naharonline.com > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
