jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases 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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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’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: Elegant solution instead of polling database
It's not a secret anymore!