-
1. Re: LRU Eviction algorithm not removing nodes
mjdinsmore Jul 13, 2009 11:40 AM (in response to plethora)I am seeing the same behavior. I'm on JBoss 4.2.2RC and appear to have the same setup, i.e.:
jboss:service=Naming
jboss:service=TransactionManager
org.jboss.cache.JBossTransactionManagerLookup
PESSIMISTIC
READ_COMMITTED
LOCAL
15000
org.jboss.cache.eviction.LRUPolicy
5
10000
3600
86400
50000
6000 -
2. Re: LRU Eviction algorithm not removing nodes
mjdinsmore Jul 13, 2009 12:59 PM (in response to plethora)I think I found the answer --
Just put a double slash before your entity names, ie.<region name="//com/company/foobar">
and then the entities will be evicted. There's a post on the Hibernate forum here:
https://forum.hibernate.org/viewtopic.php?f=1&t=941748&start=0
that was posted in April 2005, and says by someone on the Hibernate team,Ooops i kinda half noticed that but never really thought about why
before.... It's fixed in CVS.
But apparently the fix was lost or they thought they updated some document about it and that was promptly lost.[/url] -
3. Re: LRU Eviction algorithm not removing nodes
galder.zamarreno Jul 20, 2009 4:35 AM (in response to plethora)@amurugan, maybe you wanna enable TRACE logging and add thread information to the logs to see what's going on underneath.
@mjdinsmore region names for entities are not simply constructed with the class names, there's more information that you need to take in account such as the persistence unit...etc.
Although http://www.jboss.org/community/wiki/ClusteredJPAHibernateSecondLevelCachinginJBossAS5 is an AS5 wiki, the hibernate.cache.region_prefix discussion also applies to 4.2.
Unless you use hibernate.cache.region_prefix, the JPA deployer generates a path that you need to be aware of when defining evictions. The '//' seems to be some kind of trick to get around this but we haven't tested this at length and we haven't documented it, so can't guarantee it will work as expected.
Finally, @mjdinsmore, your topic is different to amurugan's, so please stop hijacking other people's threads :) -
4. Re: LRU Eviction algorithm not removing nodes
mjdinsmore Aug 4, 2009 10:36 AM (in response to plethora)I wasn't aware I was hijacking the thread! :-)
I had my caching set up and saw that things were getting put into the cache and never getting cleared (like Amurugan), so I added the extra slash (per the other post) to correct it. It seemed to work in that stale items were now getting flushed. I had made this addition in the treecache.xml file.