aspose 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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies 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
I agree. Here's the link:
subject: Elegant solution instead of polling database
Similar Threads
Multi part resonse from servlet
Improving performance of a REST Webservice
Connection Factory pls explain
keeping http clients up to date