This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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: 30595
    
154

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: 30595
    
154

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