From: max <maxbox@directbox.com>
To: pgsql-jdbc@postgresql.org
Subject: Questions about Listen/Notify mechanism
Date: Sun, 18 Jul 2010 04:33:30 +0200
Message-ID: <4C4267FA.2080604@directbox.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: maxbox@directbox.com
Subject: Re: Questions about Listen/Notify mechanism
In-Reply-To: <4C4267FA.2080604@directbox.com>
References: <4C4267FA.2080604@directbox.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox