title: Hibernate Dirty Object usage
body: <p>I have a Hibernate Entity in my code. i would fetch that and based on the value of one of the properties ,say "isProcessed" , go on and :  </p>
  
  <ol>
  <li>change value of "isProcessed" to "Yes" (the property that i checked)  </li>
  <li>add some task to a DelayedExecutor.</li>
  </ol>
  
  <p>in my performance test, i have found that if i hammer the function,a classic dirty read scenario happens and i add too many tasks to the Executor that all of them would be executed. i can't use checking the equality of the objects in the Queue based on anything , i mean java would just execute all of them which are added.</p>
  
  <p>how can i use hibernate's dirty object stuff to be able to check "isProcessed" before adding the task to executor? would it work?</p>
  
  <p>hope that i have been expressive enough. </p>