Path: csiph.com!news.redatomik.org!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: Mon, 21 Aug 2017 19:50:52 -0400 Organization: Aioe.org NNTP Server Lines: 17 Message-ID: References: <87y3qovwjb.fsf@munus.decebal.nl> <87tw1bx2c9.fsf@munus.decebal.nl> <87a833wzcx.fsf@munus.decebal.nl> <87pobz9yv5.fsf@munus.decebal.nl> <871sofrwsk.fsf@munus.decebal.nl> NNTP-Posting-Host: PBuS014lhzVyHjLbXmo/ZQ.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:52.0) Gecko/20100101 Thunderbird/52.3.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:37333 On 8/21/2017 4:25 PM, Robert Klemme wrote: > On 14.08.2017 02:41, Arne Vajhøj wrote: >> You have 3 levels of resources: Connection, Statement, ResultSet. >> >> You need 3 levels of try. > > It depends: you can get away with two levels if Statements do not live > much longer than ResultSets or if you only want to make sure resources > are released eventually because closing the Statement will implicitly > close the ResultSet as well. True. s/need/should consider it natural to use/w Arne