Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2EEA1632769 for ; Sun, 18 Jul 2010 02:55:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 62412-10 for ; Sun, 18 Jul 2010 05:54:54 +0000 (UTC) X-Greylist: delayed 03:21:25.172613 by SQLgrey-1.7.6 Received: from smtpa2.mediabeam.com (smtpa1.mediabeam.com [194.25.41.13]) by mail.postgresql.org (Postfix) with ESMTP id C4841632671 for ; Sun, 18 Jul 2010 02:54:54 -0300 (ADT) Received: from DIRECTBOX-SMTP2 (balancer4.mediabeam.com [194.25.41.40]) by smtpa2.mediabeam.com (8.13.8/8.13.1) with ESMTP id o6I2XR4d015220 for ; Sun, 18 Jul 2010 04:33:27 +0200 Received: from [192.168.0.14] (dslb-088-074-035-182.pools.arcor-ip.net [88.74.35.182]) (authenticated bits=0) by smtpa.mediabeam.com (8.13.8/8.13.1) with ESMTP id o6I2XQUk008372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 18 Jul 2010 04:33:27 +0200 Message-ID: <4C4267FA.2080604@directbox.com> Date: Sun, 18 Jul 2010 04:33:30 +0200 From: max User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Questions about Listen/Notify mechanism Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.6 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201007/46 X-Sequence-Number: 20711 Hallo, I need to write a Java app which deals with as low as possible network resources. That's why the database should inform my Java app about changes and I does not have to poll the database every 5 seconds to recognize them. I read the Postgresql-JDBC documentation about the Listen/Notify commands. I do not understand that note "A key limitation of the JDBC driver is that it cannot receive asynchronous notifications and must poll the backend to check if any notifications were issued." Does that mean that the driver will poll the database, e.g. every 5 seconds? If so, that would not be acceptable for me, because that is exactly what I want to avoid. The only advantage of using Listen/Notify in that case would be that I don't need an extra notification table that my trigger would fill. Am I wrong? Oo I hope somebody can help me with that. Regard, Max