It's not a secret anymore!
The moose likes JDBC and Relational Databases 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 and Relational Databases
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: 32501
    
214

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.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, 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: 32501
    
214

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to poll a database table for changes from a java program
 
It's not a secret anymore!