title: Grails Quartz job retrieves old data from MySQL
body: <p>I have a single threaded Quartz job that is kicked off after changing a record's 'status' column. The job is passed the primary id for the record which it then looks up. For some strange reason the quartz job sees the original status value. </p>
  
  <p>The job has logic to retry the lookup every second up to a minute. At first I thought that hibernate might be returning the old object so I added a <code>session.clear()</code> but that made no difference. I then added a <code>jdbcTemplate.queryForMap</code> to pull in the data bypassing hibernate but that too sees the old data.</p>
  
  <p>While the Quartz job is logging the old value, I see the new value in a show view and in a sql query that I manually invoke against the database. I even checked the version property and see that it has changed but the Quartz job has the old value.</p>
  
  <p>Is there any reason why the Quartz job would not recognize the change?</p>
  
  <p>The strange thing is that this logic works perfectly fine on some servers, others it consistently fails and others where it fails periodically.</p>
  
  <p>The environments consist of:</p>
  
  <ul>
  <li>Grails 1.3.7</li>
  <li>MySQL </li>
  <li>Linux</li>
  <li>Tomcat</li>
  </ul>