Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: Which databases are the most used with Java Date: Tue, 15 Aug 2017 11:46:34 -0400 Organization: Aioe.org NNTP Server Lines: 18 Message-ID: References: <87y3qovwjb.fsf@munus.decebal.nl> <87tw1bx2c9.fsf@munus.decebal.nl> <87a833wzcx.fsf@munus.decebal.nl> <87pobz9yv5.fsf@munus.decebal.nl> <87h8x9pfi8.fsf@munus.decebal.nl> <877ey5ngtu.fsf@munus.decebal.nl> <6b0c0b97-8517-4f08-b512-fc3f3054fbb6@googlegroups.com> <87378soq8a.fsf@munus.decebal.nl> NNTP-Posting-Host: LO3gx2vFpREKIznvPHDlcg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:37247 On 8/15/2017 11:19 AM, Eric Douglas wrote: > On Tuesday, August 15, 2017 at 11:12:46 AM UTC-4, Arne Vajhøj wrote: >> (BTW I think Oracle did it wrong rs is not closed) > > Well, the javadoc "Releases this ResultSet object's database and > JDBCresources immediately instead of waiting for this to happen when it is > automatically closed.", so yeah should be best practice to call close as > soon as you're done with it, otherwise it should close itself at some > point so whether or when that's really required may depend on where it's > used. The fine print of the JDBC spec states that ResultSet's get closed when the Statement gets closed. But I prefer the explicit close or in newer code the try with resource. Arne