What's the best way to monitor a table from a java bean? Is it possible to detect new entries into the table dynamically without polling (re-querying) the table at timed intervals?
I want to load a bean at application startup with the entries from a table in the database, and then have it automagically detect if new entries are added to the table and load those entries so that it can "push" them to the client. (I'm planning to use Flex on Java) Something symilar to how Google mail just pops up with the new e-mails you recieved without you having to refresh the page.
Related posts:








2 responses so far ↓
1 Ravindra G // Jun 11, 2008
It is not possible to detect new entries in a table without polling. If you do not want to touch the table (query the table), you can create another table with a single column.
Write a trigger for the "after insert" event of first table and set the flag.
Through the program you query the second table and reset the flag.
According to the flag, you can know whether new entries are added or not.
Hope this helps.
2 himanshu s // Jun 11, 2008
Even I got this type of problem in my java Swing Application ………………. & I got a solution through action listener I just added action listener to every section of row & column in table (eg. Like in excel section A , section B….) so that when ever client or user enter some data through form section or table……….. Action listener reads up content if statement is true he add data into the table…
I hope using this your problem will be solve
bye
Leave a Comment