We are running jboss 4.2GA and treecache that comes with it as a hibernate cache provider. The hibernate also comes with the default jboss 4.2GA.
The following is the cache config (deployed as jboss mbean:
<attribute name="CacheMode">LOCAL</attribute> <attribute name="IsolationLevel">REPEATABLE_READ</attribute> <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute> <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute> <attribute name="EvictionPolicyConfig"> <config> <attribute name="wakeUpIntervalSeconds">60</attribute> <region name="/_default_"> <!--0 means no limit --> <attribute name="maxNodes">0</attribute> <attribute name="timeToLiveSeconds">1800</attribute> <attribute name="maxAgeSeconds">1800</attribute> </region>
you could disable eviction if you don't need it. Otherwise you should just have the eviction thread run more frequently.