This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
I need to watch a table i.e., whenever there is insert in a table my java code will do some actions. For this I am planning to use while(true) loop. In this infinite loop I will select data from table. If there is some new insert in table, I will perform my functions and will continue to do this whenever there is a new insert in table.
My code will run forever and there will be scheduled shutdown in a week and will be restarted in 5 - 10 minutes.
Is it a right approach to use while(true) ?
Any other way to listen database table ?
Note: database is Teradata (RDBMS) and not Oracle