Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 67AEC2E0039 for ; Tue, 26 Feb 2008 10:20:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 15967-01 for ; Tue, 26 Feb 2008 10:20:29 -0400 (AST) X-Greylist: delayed 00:43:29.937483 by SQLgrey-1.7.5 Received: from ikoffice.de (ikoffice.de [81.169.166.92]) by postgresql.org (Postfix) with ESMTP id CEF0A2E0033 for ; Tue, 26 Feb 2008 10:20:29 -0400 (AST) Received: from p5481e55f.dip.t-dialin.net ([84.129.229.95] helo=[192.168.1.16]) by ikoffice.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1JTzzK-0002Ue-2i for pgsql-jdbc@postgresql.org; Tue, 26 Feb 2008 14:36:54 +0100 Message-ID: <47C415F8.2020406@ikoffice.de> Date: Tue, 26 Feb 2008 14:36:56 +0100 From: Daniel Migowski User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Fastest way to check aliveness of connection Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Bar: ---- X-Spam-Score-Int: -39 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/197 X-Sequence-Number: 18404 Hello, I want to implement a c3p0 ConnectionTester and now need a fast way to check for the alivelyness of a Connection. Currently I issue a "select 1" to the database and if I don't get an exception I assume the connection is still alive. Is there a faster way? How can I check if the underlying socket is still alive without doing a JDBC request? This has to work only with PostgreSQL JDBC, so I can cast to any postgres interface available. With best regards, Daniel Migowski