Quote:
a user subscribes to LS (Lightstreamer). then my Javaadapter has an infinite loop querying the database for updates on multiple tables. but this is not optimal, it query to the database unnecessarily, so i need i way to perform this query to the database only if some value in the database was changed.
this depends on your DB, if it has a way to notify you that something has changed than you may just wait for such notifications and only then query it.
Otherwise keep in mind that an infinite strict loop is always a bad idea (even if, having a blocking call to query the DB you'll not have a proper strict loop unless the network is down and the connection to the db fails immediately)