I am using Java EE with the Spring Framework and Hibernate. I want to write a very simple database poller that does the following
- Poll the DB every second
- If a certain column in a certain row has the value that I want, stop polling and return success.
- If polling has gone on for 10 or more seconds, return failure
I have already looked into Java's ScheduledExecutorService and ExecutorService, and I think that I may be able to do what I want with these. My question is, is there something built into Spring/Hibernate that can do this more elegantly?
Aucun commentaire:
Enregistrer un commentaire