From: Oliver Jowett <oliver@opencloud.com>
To: David Gagnon <dgagnon@siunik.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: implementing asynchronous notifications
Date: Thu, 21 Apr 2005 11:15:34 +1200
Message-ID: <4266E296.6050105@opencloud.com> (raw)
In-Reply-To: <42667C72.9070708@siunik.com>
References: <Pine.LNX.4.44.0504110519590.13042-200000@ns.surfnonstop.com>
<4265A05C.6050302@opencloud.com>
<42667C72.9070708@siunik.com>
David Gagnon wrote:
> I just read this thread. Wich seems really interesting. Is there an
> example on how to use Async Notifies? I look at it a couple of months
> ago and found it not sufficient for my needs. I need to implement a
> notification mechanism to clear data from caches in my application on
> data update.
>
> Is this change allow me to do that .. ? That will be so nice :-)
>
> If yes it's that possible to get a small example on how to use it.
Basically, you can now call PGConnection.getNotifications() and get
results without having to submit a dummy query first.
You will still need an application-level loop that periodically calls
it, though. Also, it's not guaranteed to give you notifications: you
must be not in a transaction (this is server-side behaviour), and you
must be using a Socket implementation that implements available() (SSL
connections may not do this).
-O
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: oliver@opencloud.com, dgagnon@siunik.com
Subject: Re: implementing asynchronous notifications
In-Reply-To: <4266E296.6050105@opencloud.com>
References: <Pine.LNX.4.44.0504110519590.13042-200000@ns.surfnonstop.com> <4265A05C.6050302@opencloud.com> <42667C72.9070708@siunik.com> <4266E296.6050105@opencloud.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