Results 1 to 2 of 2
  1. #1
    KentDMc is offline Member
    Join Date
    Apr 2009
    Rep Power

    Question Oracle trigger interacting with Java app

    Thanks for looking at this. I'm building a Java server app, 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 essentially 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.

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Cambridge, UK
    Rep Power


    You could set up a ServerSocket in your main Java app and have your trigger send a message to it. If you want to get really advanced you could have your trigger call an RMI method.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

Similar Threads

  1. Mutating trigger help
    By xcallmejudasx in forum JDBC
    Replies: 4
    Last Post: 04-24-2009, 11:49 PM
  2. programmaticly trigger an event
    By maxim in forum AWT / Swing
    Replies: 3
    Last Post: 02-23-2009, 04:27 PM
  3. Replies: 0
    Last Post: 08-27-2008, 10:27 AM
  4. Interacting with the Java Garbage Collector
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-28-2008, 09:04 PM
  5. Interacting with files.
    By apfroggy0408 in forum New To Java
    Replies: 1
    Last Post: 03-19-2008, 07:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts