I am using treecache as an in-memory cache of my web application.I wrapped it as a bean and config it in Spring Ioc container,which will be initiated at the jboss startup time.The treecache hole some frequently used POJOs to avoid intensive database access.
Now I found that,if there is no any operation to use the cache objects for some time,if to get it again ,there will raise a NullPointerException.Seemed the cache object has been removed from the cache.
I guess this is because the Eviction Policies but not sure. I'm new to treecache,Anyone can help me ? If it does related to Eviction Policies,how to config the policy ?
Please see the JBoss Cache user guide which contains an entire chapter on eviction policies.
This certainly sounds like you have an eviction policy emptying your cache.