Java: Do something on event in SQL Database?
Posted
by wretrOvian
on Stack Overflow
See other posts from Stack Overflow
or by wretrOvian
Published on 2010-06-16T07:16:01Z
Indexed on
2010/06/16
7:22 UTC
Read the original article
Hit count: 155
Hello
I'm building an application with distributed parts. Meaning, while one part (writer) maybe inserting, updating information to a database, the other part (reader) is reading off and acting on that information.
Now, i wish to trigger an action event in the reader and reload information from the DB whenever i insert something from the writer.
Is there a simple way about this?
Would this be a good idea? :
// READER
while(true) {
connect();
// reload info from DB
executeQuery("select * from foo");
disconnect();
}
© Stack Overflow or respective owner