Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 546E263272D for ; Sun, 2 Aug 2009 19:21:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 09694-04 for ; Sun, 2 Aug 2009 22:20:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id CFDDB632369 for ; Sun, 2 Aug 2009 19:20:59 -0300 (ADT) Received: from 122-57-44-76.jetstream.xtra.co.nz ([122.57.44.76] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1MXjQC-0006Zn-2d; Mon, 03 Aug 2009 10:20:52 +1200 Message-ID: <4A76113F.8020101@opencloud.com> Date: Mon, 03 Aug 2009 10:20:47 +1200 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Herouth Maoz CC: pgsql-jdbc@postgresql.org Subject: Re: How to retry when connection has been closed? References: <200908021212.56184.herouth@unicell.co.il> In-Reply-To: <200908021212.56184.herouth@unicell.co.il> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/3 X-Sequence-Number: 19852 Herouth Maoz wrote: > Is there a more elegant way to find out whether the connection has been > dropped from within the catch clause? Test the SQLState of the thrown SQLException. See http://www.postgresql.org/docs/8.4/static/errcodes-appendix.html -O