agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] Notify/Listen
Date: Tue, 15 Aug 2006 00:53:17 +0200
Message-ID: <44E0FEDD.7030005@tada.se> (raw)
In-Reply-To: <75F39425D1954A4380D5C9E1D630CDC903C30CB4@C2A007.stratford.auto.cooperintra.ctb>
References: <75F39425D1954A4380D5C9E1D630CDC903C30CB4@C2A007.stratford.auto.cooperintra.ctb>

Burtenshaw, John J. wrote:
> 
> Has anyone ever used the Notify/Listen mechanism in pljava?  How would 
> you implement a client program that would do an sql Listen?  Apparently 
> according to the Postgresql docs there are functions that need to be 
> called periodically to see if an event has occured or not (i.e. 
> PQnotifies in libpq)
> 
I doubt I can make LISTEN work in PL/Java. To my knowledge, there's no support for it in the 
underlying SPI routines and implementing such support would imply a multi-threaded backend.

Keep in mind that PL/Java executes functions within a transaction. It can never start a 
transaction on its own behalf. It is fundamentally different from a client.

Regards,
Thomas Hallgren





view thread (3+ messages)

Message-ID: <44E0FEDD.7030005@tada.se>
Permalink:  ../44E0FEDD.7030005@tada.se/
Also on:    postgresql.org/message-id/44E0FEDD.7030005@tada.se

reply

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 using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] Notify/Listen
  In-Reply-To: <44E0FEDD.7030005@tada.se>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox