Oracle trigger interacting with Java app


General J2EE: Oracle trigger interacting with Java app

  1. Oracle trigger interacting with Java app (1 messages)

    Thanks for looking at this. I'm building a Java application, not a web app or anything like that, that will query an oracle table on startup to get most of its configuration information. That information will be cached, as I don't want it to have to execute a query each time some config item, like a URL, is needed. But I need an efficient way to monitor that table for updates in order to update the cached values. Someone suggested an Oracle trigger. From looking some stuff up, I see that an Oracle trigger can call a java method. Here is what I don't know. How would an Oracle trigger, or a Java method it called, effect a currently running Java app? I think this is a Java question and not an Oracle one. But since the Oracle trigger would essential spin up a new instance of whatever java application it called, I'm not sure how that java application would be able to then fireoff a method in the currently running java app. Please expain this to me or give me some topics to research.

    Threaded Messages (1)

  2. JMS[ Go to top ]

    you can can call a java method from the trigger. This method can post a message on some jms topic. Your java app should be subscribed to this topic, when it will receive the message it should re-query all needed info :)) It is possible to use some other sort of queuing mechanism.