Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to poll a database table for changes from a java program

 
thomas jacob
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to write a java program to poll a database table for changes. How do I get started? Please suggest

Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas,
There are two parts - the polling part and the JDBC part. For the polling part - what kind of application is it? If JEE, you can use the timer service. Otherwise, you can start a thread.
 
thomas jacob
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne,
Is there any similar examples available on the web. I really bothered about the transaction mangement and stuff.

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Examples of what? You haven't said which approach you are looking at.

Also, what about transaction management? Polling is a read only activity. The other processes that are writing to the database would protect the data's ACID properties.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic