Results 1 to 2 of 2
- 04-26-2009, 10:22 PM #1Member
- Join Date
- Apr 2009
- Rep Power
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.
- 04-27-2009, 02:49 AM #2
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
- By xcallmejudasx in forum JDBCReplies: 4Last Post: 04-24-2009, 11:49 PM
- By maxim in forum AWT / SwingReplies: 3Last Post: 02-23-2009, 04:27 PM
- By wwwlife in forum JDBCReplies: 0Last Post: 08-27-2008, 10:27 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 03-28-2008, 09:04 PM
- By apfroggy0408 in forum New To JavaReplies: 1Last Post: 03-19-2008, 07:14 AM