aspose file tools*
The moose likes JDBC and the fly likes How to poll a database table for changes from a java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to poll a database table for changes from a java program" Watch "How to poll a database table for changes from a java program" New topic
Author

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

thomas jacob
Ranch Hand

Joined: May 19, 2005
Posts: 91
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

Joined: May 26, 2003
Posts: 31057
    
232

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
thomas jacob
Ranch Hand

Joined: May 19, 2005
Posts: 91
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

Joined: May 26, 2003
Posts: 31057
    
232

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to poll a database table for changes from a java program