My Application has a service will polls internally for job output. It polls till the job status changes from "In-progress" to "Completed". Another system is going to update the job status to "Completed" once it processes the job.
The problem here is, first time when the job status is polled from DB the status as "In-progress". But later even when the job status is changed by other process I still see it as "In-progress". The issue is not with DB Isolation level(Repeatable Read) as my hibernate queries are executing out of transaction. I suspect the results are cached and when same query is executed in the same session, I'm getting the cached results.
How can I get the updated data from DB when same query is executed in same session multiple times.
Regards, Chandu