title: JPA 2 + EclipseLink : Caching Issue
body: <p>I have a strange behavior with caching and JPA Entities (EclipseLink 2.4.1 ) + GUICE PERSIST</p>
  
  <p>I will not use caching, nevertheless  <strong>I get randomly an old instance that has already changed</strong> in MySQL database.</p>
  
  <p>I have tried the following:</p>
  
  <ol>
  <li><p>Add @ Cacheable (false) to the JPA Entity.</p></li>
  <li><p>Disable Cache properties in the persistence.xml file :</p></li>
  </ol>
  
  <p></p>
  
  <pre><code>     &lt;class&gt;MyEntity&lt;/class&gt;
       &lt;shared-cache-mode&gt;NONE&lt;/shared-cache-mode&gt;    
       &lt;properties&gt;      
  
              &lt;property name="eclipselink.cache.shared.default" value="false"/&gt;
           &lt;property name="eclipselink.cache.size.default" value="0"/&gt;
          &lt;property name="eclipselink.cache.type.default" value="None"/&gt;
          &lt;property name="eclipselink.refresh" value="true"/&gt;
          &lt;property name="eclipselink.query-results-cache" value="false"/&gt;
              &lt;property name="eclipselink.weaving" value="false"/&gt;          
       &lt;/properties&gt;  
  </code></pre>
  
  <p></p>
  
  <p>Even activating trace EclipseLink, i see the JPQL query:</p>
  
  <p><em>ReadObjectQuery Execute query (name = "readObject" referenceClass = XX sql = "... (just making a call" find "the entityManager</em></p>
  
  <p>but, However randomly returns an old value of that class.</p>
  
  <h2><strong>Note</strong></h2>
  
  <p><em>Perhaps happens for using different instances of EntityManager and everyone has their cache?
  I have seen the following related post : Disable JPA EclipseLink 2.4 cache
  If so, is possible to clear the cache of ALL EntityManager whithout using : ????
  em.getEntityManagerFactory().getCache().evictAll();
  Is it possible to clear ALL caches whithout using evictALL ??</em></p>