File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Elegant solution instead of polling database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Elegant solution instead of polling database" Watch "Elegant solution instead of polling database" New topic
Author

Elegant solution instead of polling database

Vladas Razas
Ranch Hand

Joined: Dec 02, 2003
Posts: 385
I have application A which updates DB and server B which reads data from DB. The server needs a way to get new data as soon as it becomes available.

1. Database polling? RRrrr I don't like that.
2. Make a intermediate module? Something like web service which is responsible for all DB access for both server and application.

I don't use EJB at this point so I can't take advantage of entity beans.
DB triggers? Is it possible to get information on DB update in standard way which would be portable accross different DB engines?
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
A service layer on top of the database would do it. So would a JMS queue. And to be honest, if your needs are simple then polling isn't that much of a crime.

- Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Elegant solution instead of polling database