Problem with expiration eviction
jreeman Aug 8, 2008 8:37 AMHello,
I wrote the following code to use expiration eviction policy :
Region region = admDataCache.getRegion(fqn, true); ExpirationConfiguration expirationConfiguration = new ExpirationConfiguration(); expirationConfiguration.setTimeToLiveSeconds(10); region.setEvictionPolicy(expirationConfiguration); admDataCache.getRoot().put(fqn, objectToCache);
But my cached objects never expire.
My cache-configuration doesn't contain any eviction property :
<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="org.jboss.cache.jmx.CacheJmxWrapper" name="jboss.cache:service=TreeCache"> <depends>jboss:service=Naming</depends> <attribute name="IsolationLevel">SERIALIZABLE</attribute> <attribute name="CacheMode">INVALIDATION_SYNC</attribute> <attribute name="ClusterName">Cluster-Of-Controllers</attribute> <attribute name="ClusterConfig"> <config> <TCP start_port="7800" loopback="true"/> <MPING timeout="3000" bind_to_all_interfaces="false" mcast_addr="225.0.0.1" mcast_port="7500" ip_ttl="0" num_initial_members="2" /> <MERGE2 max_interval="20000" min_interval="10000" /> <FD_SOCK /> <VERIFY_SUSPECT timeout="1500"/> <pbcast.NAKACK gc_lag="50" max_xmit_size="8192" retransmit_timeout="600,1200,2400,4800" /> <UNICAST timeout="600,1200,2400"/> <pbcast.STABLE desired_avg_gossip="20000" /> <pbcast.GMS join_retry_timeout="2000" join_timeout="5000" print_local_addr="false" shun="true" /> <pbcast.STATE_TRANSFER /> </config> </attribute> <attribute name="FetchStateOnStartup">false</attribute> <attribute name="InitialStateRetrievalTimeout">5000</attribute> <attribute name="LockAcquisitionTimeout">15000</attribute> <attribute name="UseMarshalling">false</attribute> <attribute name="CacheLoaderShared">true</attribute> <attribute name="CacheLoaderPreload">/</attribute> <attribute name="CacheLoaderPassivation">false</attribute> <attribute name="CacheLoaderFetchPersistentState">false</attribute> <attribute name="CacheLoaderFetchTransientState">false</attribute> <attribute name="CacheLoaderAsynchronous">false</attribute> </mbean> </server>
Could you tell to me why my code doesn't work ?
Thx