I have a Java application using a MySQL database through sleep mode. The database is really used as a persistence level: the database is read when the program is loaded, and the records are stored in memory.
However, we add extra complexity when another process can also modify the database, and it would be nice if the changes affected the Java application. However, I do not particularly like the mechanisms for moving queries to the database every few seconds, especially because the database is rarely updated.
Is there a way to get a callback to listen for changes to the database? Would triggers help?
source
share