Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0DBD92E010B for ; Mon, 18 Feb 2008 15:11:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49789-03-2 for ; Mon, 18 Feb 2008 15:11:41 -0400 (AST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by postgresql.org (Postfix) with ESMTP id D0B3E2E0090 for ; Mon, 18 Feb 2008 15:10:58 -0400 (AST) Received: by wr-out-0506.google.com with SMTP id 71so1903500wri.5 for ; Mon, 18 Feb 2008 11:10:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=YxBW2j+VxN3wg+zl9sFQaTPn+FcyGuh0IdAllBt9xtI=; b=SdI/N/kV4T2NiBs1MGntUVTTrqg6sJfP6jTSMKT9dDaVMJlfUkLEJeGhBLFBRfRv+Pg+v9PCKaEu74FjLypub6TbDwoohkXUzVYoUuo+behscubgYysXGglce2jX3rsceqi+SStQqNpLT63gYcOFosJQQ0CUYXA9P0RPj9NxQ6w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=m5Nnzz6GEyse+MpLwcHgfdCPiQ5oJjXkY8iCiEMyGBnUa/I0S65RFnrAS8MLyR4OYtYTmnV4Oe/SZeJ4PZxFn5lMF/eIT901C6WZfW3p0oH+WDlA7TGzPZ8Veprdksewf9LhN97OMMXkyWIaSDDVJPF6BvHJua2lojC4SGhQUy8= Received: by 10.142.44.11 with SMTP id r11mr1386821wfr.13.1203361856719; Mon, 18 Feb 2008 11:10:56 -0800 (PST) Received: by 10.142.179.18 with HTTP; Mon, 18 Feb 2008 11:10:56 -0800 (PST) Message-ID: <3fccaa690802181110j4b5d1429ta8ea641f4ebb160@mail.gmail.com> Date: Mon, 18 Feb 2008 13:10:56 -0600 From: "Andres Olarte" To: "Paul Tomblin" Subject: Re: Getting "This ResultSet is closed" exceptions Cc: pgsql-jdbc@postgresql.org In-Reply-To: <8efd35820802181059x45bf1f0el712930cffa58ed6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8efd35820802180619l352d9b0eta35788642a5fc4eb@mail.gmail.com> <3fccaa690802181051r377afa2an33fb9e1a3a7b65ca@mail.gmail.com> <8efd35820802181059x45bf1f0el712930cffa58ed6@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/123 X-Sequence-Number: 18330 You might go for using a single connection per thread. Works for me. On Feb 18, 2008 12:59 PM, Paul Tomblin wrote: > On Feb 18, 2008 1:51 PM, Andres Olarte wrote: > > Another thread my close the result set if it's using the same > > statement. Or the thread may close the connection, but i think that > > would throw another exception. Other wise your code look right > > Well, no other method is using the same PreparedStatement. So I guess > it's likely that another thread is doing the same query, and that's > what's closing the ResultSet. I guess it's time to make some of these > methods synchronized. > > -- > For my assured failures and derelictions I ask pardon beforehand of my > betters and my equals in my Calling here assembled, praying that in > the hour of my temptations, weakness and weariness, the memory of this > my Obligation and of the company before whom it was entered into, may > return to me to aid, comfort and restrain. > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend >