[jboss-user] [JBossCache] - ExpirationAlgorithm (2.0.0.CR1) doesn't work with expiry dat

jamieqho do-not-reply at jboss.com
Tue May 8 19:53:45 EDT 2007


Hi,

In ExpirationAlgorithm.java, elements are being removed from a TreeMap like this:

boolean found = set.remove(new ExpirationEntry(fqn));

This absolutely does not work because your ExpirationEntry objects are sorted by expiration date in the Tree (as specified by your compareTo method).  The code from Sun does a tree walk and cannot find an ExpirationEntry matching yours because you didn't specify an expiry date.

The end result is two ExpirationEntry objects in the set with the same fqn, but different expiry dates.  

I was very confused by this and wondered why my objects were expirying out of the cache, even though I periodically bumped up the expiry date.  Now I realize this is happening because the old expiry date was never properly removed from your set of ExpirationEntry objects.

Is this is known bug?  If no, will it be fixed soon?

Thanks,
Jamie

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044125#4044125

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044125



More information about the jboss-user mailing list