wood burning stoves 2.0*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Elegant solution instead of polling database" Watch "Elegant solution instead of polling database" New topic

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
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
subject: Elegant solution instead of polling database
Similar Threads
Multi part resonse from servlet
Connection Factory pls explain
Improving performance of a REST Webservice
keeping http clients up to date