I got a problem with eviction. I added to xml file eviction policy attribute.
It looks like this
<!-- Name of the eviction policy class. --> <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute> <!-- Specific eviction policy configurations. This is LRU --> <attribute name="EvictionPolicyConfig"> <config> <attribute name="wakeUpIntervalSeconds">5</attribute> <!-- Cache wide /COM/BusinessOrder--> <region name="/COM/BusinessOrder/"> <attribute name="maxNodes">5000</attribute> <attribute name="timeToIdleSeconds">3</attribute> </region> </config> </attribute>
Can you try to sleep longer than 10 seconds, say, 15? Since the eviction timer thread runs every 5 seconds, there is a chance that 10 seconds is on the borderline.
Otherwise, I'd suggest you check out the example JUnit tests. There are couple tests running evitction policy.