How to send an alert from BD Oracle to Java web

0

I come with a question that has given me a couple of laps ....

I have a Java web app that, among many things, maintains the stock of products, the Oracle database has the table (image) where the data persists.

So my query is: Can I use a trigger to send a low stock alert (stock_critico) to the application, creating a listener in the app?

If my concept of listener is wrong, please tell me.

Any tutorial or document where I can do what I need ???

I thank you in advance ....

    
asked by Jonathan 17.05.2018 в 05:16
source

1 answer

0

You have to use JMS in oracle and java. I have never done it, but it is something like this: You have to create a Java Store Procedure in oracle that works as productor de JMS and publish the message you want (this is similar to servidores de colas de mensajes [in fact JMS is an abstraction / generalization of the queue servers]). In the trigger you invoke this Java Store Procedure . On the side of the web application you have to create a consumidor JMS o susbscriptor that reads said message and update the application with the data you want.

How to get started with Oracle JMS and Introduction to Oracle JMS can help you.

This is what I know is there to do what you want, but I never have done it again.

    
answered by 17.05.2018 в 18:19