pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Herouth Maoz <herouth@unicell.co.il>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: How to retry when connection has been closed?
Date: Mon, 03 Aug 2009 10:20:47 +1200
Message-ID: <4A76113F.8020101@opencloud.com> (raw)
In-Reply-To: <200908021212.56184.herouth@unicell.co.il>
References: <200908021212.56184.herouth@unicell.co.il>

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



view thread (2+ messages)

Message-ID: <4A76113F.8020101@opencloud.com>
Permalink:  ../4A76113F.8020101@opencloud.com/
Also on:    postgresql.org/message-id/4A76113F.8020101@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, herouth@unicell.co.il
  Subject: Re: How to retry when connection has been closed?
  In-Reply-To: <4A76113F.8020101@opencloud.com>
  References: <200908021212.56184.herouth@unicell.co.il> <4A76113F.8020101@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox