Re: Getting DBMS_ALERT to signal database updates to a Java application

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1999/02/16
Message-ID: <36c981ee.5336363_at_192.86.155.100>#1/1


A copy of this was sent to "E. Kideys" <ed_at_kideys.com> (if that email address didn't require changing) On Tue, 16 Feb 1999 14:27:37 GMT, you wrote:

>Hi everyone,
>
> I would like my Java application to be alerted to any changes to a
>certain table in my Oracle 8.0.5 database. I am aware of a feature
>called DBMS_ALERT which accomplishes this but through Pro C functions.
>

no, its not done via pro*c functions, its done by calling stored procedures. You just need to interface with dbms_alert.* the same way you would any other stored procedure. You can just use jdbc to do this. It is no different from any other stored proc out there.

You're java application would use dbms_alert.register and dbms_alert.waitone/waitany to recieve a signal.

>I have already written my application in Java and I use JDBC for normal
>SQL operations. The project manager refuses another upgrade of the
>database to 8i so I must use the present Oracle 8.0.5.
>
>For those of you who are familiar with DBMS_ALERT, how can I get it to
>communicate a table change from a trigger to a running Java application?
>
>There is nothing that I saw in JDBC to accomplish this so I presume I
>must use SQLJ. To my understanding, SQLJ was designed to work with
>Oracle 8i.
>
>How can I embed SQLJ in my Oracle 8.0.5 database triggers with
>particular interest in DBMS_ALERT?
>
>My java application will be running on the same Windows NT machine as
>the database server.
>
>Are there any Windows NT system functions which I can use to signal the
>table change which I can embed in the trigger without using Java? What
>I had in mind was sending a message to a particular Winsock port for
>which the java application would be listening.
>
>Any help is greatly appreciated. Thanks in advance.
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/    -- downloadable utilities
 
----------------------------------------------------------------------------
Opinions are mine and do not necessarily reflect those of Oracle Corporation
 
Anti-Anti Spam Msg: if you want an answer emailed to you, 
you have to make it easy to get email to you.  Any bounced
email will be treated the same way i treat SPAM-- I delete it.
Received on Tue Feb 16 1999 - 00:00:00 CET

Original text of this message