Voici comment mon entité ressemblehibernate ne lit pas à partir de ehcache.xml OU pas de timeout?
@Entity
@Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Table(name = "TestPojoOnly")
@NamedQueries({@NamedQuery(name = "TestPojoOnly.findAll", query = "SELECT h FROM TestPojoOnly h"), @NamedQuery(name = "TestPojoOnly.findById", query = "SELECT h FROM TestPojoOnly h WHERE h.id = :id"), @NamedQuery(name = "TestPojoOnly.findByCategoryname", query = "SELECT h FROM TestPojoOnly h WHERE h.categoryname = :categoryname")})
public class TestPojoOnly implements Serializable {
mon ehcache.xml
<cache name="com.package.model.TestPojoOnly"
maxElementsInMemory="200"
eternal="false"
overflowToDisk="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
/>
Q. temps déjà mis à zéro et éternel à faux, mais lorsque je tente charge entité de db. ça vient toujours du cache. temps = 0 qui signifie pas de cache à droite? Est-ce que j'ai raté quelque chose?
ref: mon appcontex.xml à http://www.copypastecode.com/16833/
bingo! Merci mon pote – cometta