So you are saying that one way to fix it is to do a refresh on all jobs in the job list?
| public String view() {
| Map parameters = new HashMap();
| StringBuffer queryString = new StringBuffer();
|
| queryString.append("from Job");
| Query query = em.createQuery(queryString.toString());
|
| jobs = (List<Job>) query.getResultList();
|
| //Refresh all of the jobs
| for(int x = 0; x < jobs.size(); x++){
| em.refresh(jobs.get(x));
| }
| return "viewJobs";
| }
|
This does work to get the latest data, but isn't there a better way? Now I am doing
an additonal trip to the database for every job, there must be someway to force the
retrieval of the new data each call NOT from cache? Isn't this going to scale
horrible when I get thousands of jobs?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976050#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...