Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Catching commit

Re: Catching commit

From: Stephan Born <stephan.born_at_beusen.de>
Date: Wed, 05 Apr 2000 16:28:31 +0200
Message-ID: <38EB4D8F.F3DAFD23@beusen.de>


> Folks,
>
> I after a way to catch commit action in a
> PL/SQL program so that I can notify a
> JDBC client to update itself when another
> client has modified the data.
>
> In other words I can't find way of detecting that
> a commit has happened so that I can send an event
> to the JDBC client.
>

Mhhh.....try to use the package DBMS_ALERT.... with this package you can send signals to registered applications. These signals are transaction-based......this means, that the signal ist published
when the transaction ends with an COMMIT....

create a second thread in your apllication which does nothing than listening
in a second session for this signal.

in the main-thread send the signal at the beginning of an transaction. If in this session occurs a COMMIT (regardless whether in the application or in an stored
procedure) the second thread will catch the signal and can inform your main-thread to
do what you want....

Let me know if this is what you need.

Regards, Stephan

--


Dipl.-Inf. (FH) Stephan Born   | beusen Consulting GmbH
fon: +49 30 549932-0           | Landsberger Allee 392
fax: +49 30 549932-21          | 12681 Berlin
mailto:stephan.born_at_beusen.de  | Germany
---------------------------------------------------------------
       PGP-Key verfügbar       |      PGP-Key available
---------------------------------------------------------------


Received on Wed Apr 05 2000 - 09:28:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US