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

Home -> Community -> Usenet -> c.d.o.server -> Re: Triggers calling Java/servlets

Re: Triggers calling Java/servlets

From: Avi Abrami <aabrami_at_intersystemsww.com>
Date: Sun, 17 Mar 2002 08:56:38 +0200
Message-ID: <3C943E26.4690C030@intersystemsww.com>


Thomas Kyte wrote:
>
> In article <3c907bc4_at_news.broadpark.com>, "comp.text.xml" says...
> >
> >Hi.
> >
> >Is it possible to set up a trigger in Oracle than calls a Java Servlet
> >residing on a web server? I have a web application that needs to be notified
> >when a table changes in the DB.
> >
> >-Christer
> >
> >
>
> Well, you can use UTL_HTTP to run a URL. A perhaps better approach however
> might be to use AQ to queue a message and have the java process be the dequeuer
> of the message. That would be transactional and a little more "fault resistant"
> (well, alot more actually).
>
> The problem with utl_http is
>
> o the trigger might run the URL and then the statement later fails (hence the
> trigger should NOT have run the URL but you cannot "unrun" it)
>
> o there is overhead in opening the external connection, running the servlet,
> closing the connection. More then queueing a message would be.
>
> --
> Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/
> Expert one on one Oracle, programming techniques and solutions for Oracle.
> http://www.amazon.com/exec/obidos/ASIN/1861004826/
> Opinions are mine and do not necessarily reflect those of Oracle Corp

Hi Thomas,
Any chance you could point me at some documentation/sample code regarding queuing messages using AQ and dequeuing them using java?

Many thanks (in advance :-),
Avi. Received on Sun Mar 17 2002 - 00:56:38 CST

Original text of this message

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