Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B347C9FB29A for ; Tue, 17 Apr 2007 11:59:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 92461-04 for ; Tue, 17 Apr 2007 11:59:00 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id 259109FA603 for ; Tue, 17 Apr 2007 11:59:05 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id k3so147990ugf for ; Tue, 17 Apr 2007 07:59:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=hUAMhMTK9T6RQFgUtDA8kYZ9hpZewELUv+1f7DiFE6nVwQDKzKX/17REVdDWQ/OaU9c3mS3TSGVBkU8TohHH/0rvnK0n1g2wmsl9DC5RENtVQxQ9hJ77J/3VeKF0oDIZY8+MMABTBTEcD05h7FUoHzQS/rfoWBrpXC2h1z7r3BY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:to:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=EOa1n6tSKIJ5KcYzN7nP99FLjLTUFDOjZYN1rcEs+QLhdW4mrS04e/giukF7D1c6RhlWFFQvVnTxu5LeRRv4NyxO5hNOVeF0LAAkTK3vzIr5KWaScN4w3vXX/YRy2SK43l28beysZISIoB7uOC8gNaVqMjjwyvWT5qo5Q3FIVhY= Received: by 10.82.154.2 with SMTP id b2mr10550563bue.1176821944691; Tue, 17 Apr 2007 07:59:04 -0700 (PDT) Received: from ?192.168.1.15? ( [86.205.140.183]) by mx.google.com with ESMTP id e9sm887803muf.2007.04.17.07.59.03; Tue, 17 Apr 2007 07:59:04 -0700 (PDT) Subject: Handling network errors during initial connection and ongoing use From: Adrian Custer To: pgsql-jdbc@postgresql.org Content-Type: text/plain Date: Tue, 17 Apr 2007 16:59:02 +0200 Message-Id: <1176821942.5522.32.camel@blackpad> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/60 X-Sequence-Number: 16909 Hey all, I'm working on fixing an application that uses jdbc so it will provide users with a better understanding of what is wrong when things go wrong. However, I cannot find any information on elegant ways to handle the 'unreliable' part of tcp/ip. Is there some common strategy to handle network errors during setup or use of jdbc? Specifically, I imagine all java applications using jdbc would have to handle: during initial connection no network no dns host name unknown no answer on port answer on port not postgresql bad authentication (wrong username/password if these are distinct) user doesn't have permissions to read database during ongoing use network failure server failure Could anyone point me toward documents/topic which cover these issues? Thank you, adrian custer