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 CFF209DCBB4 for ; Thu, 15 Dec 2005 16:47:04 -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 60556-04 for ; Thu, 15 Dec 2005 16:47:05 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.200]) by postgresql.org (Postfix) with ESMTP id A23B99DCBAE for ; Thu, 15 Dec 2005 16:47:02 -0400 (AST) Received: by wproxy.gmail.com with SMTP id 68so691198wra for ; Thu, 15 Dec 2005 12:47:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=qj9q8QoDEaMf4HDmkLd5yflTZwKswkWybnBEG5+0wHmmzQ8hxi381oiEYjhGwtBXH8tZlp+nMu2d9+5mI4T4yRDybTe7iRMs0sCZcfzjHfs50lfdxsL2AVW9yfWj5JDEpdI2oThe7T4fW2dtP5dFJ1Q1wi7Cyf2p5Z+ZauAXDoo= Received: by 10.65.75.3 with SMTP id c3mr769172qbl; Thu, 15 Dec 2005 12:47:03 -0800 (PST) Received: by 10.65.96.4 with HTTP; Thu, 15 Dec 2005 12:47:03 -0800 (PST) Message-ID: <4bd3e1480512151247u50479082vd08b9a1563d54604@mail.gmail.com> Date: Thu, 15 Dec 2005 13:47:03 -0700 From: Assad Jarrahian To: pgsql-jdbc@postgresql.org Subject: an efficient way of checking if the connection to a db is actually open MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12344_14555654.1134679623549" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.001 required=5 tests=[HTML_MESSAGE=0.001] X-Spam-Score: 0.001 X-Spam-Level: X-Archive-Number: 200512/60 X-Sequence-Number: 14391 ------=_Part_12344_14555654.1134679623549 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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). isClosed() * * is no good, as in, it only guarantees true if close() was actually called on it. The documentation says, the only real way is to actually call an sql statement on it. That seems inefficient. Is there any other way that is recommended? Much thanks in advance. -assad ------=_Part_12344_14555654.1134679623549 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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). isClosed()
is no good, as in, it only guarantees true if close() was act= ually called on it.

The documentation says, the only real way is to actually call an sql statement on it. That seems inefficient. Is there any other way that is recommended?
Much thanks in advance.

-assad
------=_Part_12344_14555654.1134679623549--