X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id AA5FD9DCD13 for ; Fri, 16 Dec 2005 03:57:48 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53350-01 for ; Fri, 16 Dec 2005 03:57:48 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 72D259DCC47 for ; Fri, 16 Dec 2005 03:57:46 -0400 (AST) Received: from mail.mnc.ch (62-2-77-205.business.cablecom.ch [62.2.77.205]) by svr4.postgresql.org (Postfix) with ESMTP id C6E205AF045 for ; Fri, 16 Dec 2005 07:57:47 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mail.mnc.ch (Postfix) with ESMTP id F0D85A82D8; Fri, 16 Dec 2005 08:57:41 +0100 (CET) Received: from mail.mnc.ch ([127.0.0.1]) by localhost (mail.test.lan [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 25465-05; Fri, 16 Dec 2005 08:57:41 +0100 (CET) Received: from localhost.mnc.ch (62-2-77-204.business.cablecom.ch [62.2.77.204]) by mail.mnc.ch (Postfix) with ESMTP id 9C77FA82B4; Fri, 16 Dec 2005 08:57:41 +0100 (CET) Received: by localhost.mnc.ch (Postfix, from userid 1000) id 9145B23F67F; Fri, 16 Dec 2005 08:57:38 +0100 (CET) To: Assad Jarrahian Cc: pgsql-jdbc@postgresql.org Subject: Re: an efficient way of checking if the connection to a db is actually open References: <4bd3e1480512151247u50479082vd08b9a1563d54604@mail.gmail.com> X-Hashcash: 1:20:051216:jarraa@gmail.com::BkF06Ltkxd/XXPz7:05zOC X-Hashcash: 1:20:051216:pgsql-jdbc@postgresql.org::Qy7wFBq0MrxvhXi3:0000000000000000000000000000000000000h/c From: Guillaume Cottenceau Date: 16 Dec 2005 08:57:38 +0100 In-Reply-To: <4bd3e1480512151247u50479082vd08b9a1563d54604@mail.gmail.com> Message-ID: <87wti58oel.fsf@meuh.mnc.ch> Lines: 14 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: amavisd-new at mnc.ch X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/70 X-Sequence-Number: 14401 Assad Jarrahian writes: > Hi All, > Trying to check if a connection is actually open every time I perform an > operation (if not, I want to reopen it and perform that operation). Why not performing the operation anyway, and when it fails reopening the connection and retrying the operation? Seems that it's the idea the JDBC designers had in mind, which doesn't seem too stupid. -- Guillaume Cottenceau