You could use a Timer and TimerTask. The TimerTask would be the code required to check the DB just once. Then you would schedule the TimerTask in a Timer to run 1/minute.
Amruta Jegarkal wrote:I want to know how can i write a code in java to check DB update every 1 minute?
Why?
It seems to me that you've leapt to an implementation without describing the problem. Back up and tell us what you're trying to do, and maybe we could give you better advice. What I can tell you is that "busy checking" is rarely the best solution.
Winston
Isn't it funny how there's always time and money enough to do it WRONG?