This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 34837
369
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: 34837
369
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