[jboss-user] [JBossCache] - Eviction Policy problem cache clear

Gorshkov do-not-reply at jboss.com
Wed Aug 2 07:34:41 EDT 2006


Hi, 

I try tune JbossCache
Object stored in JBoss cache successfully. But I can't remove Object from cache use EvictionPolicy.

(JBoss 4.0.4.GA + JbossCache 1.4.0.GA + EJB 3.0 RC8)

ejb3-entity-cache-service.xml:

    
  |     ...
  |     <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
  |     ...
  |     <attribute name="CacheMode">LOCAL</attribute>
  |     ...
  |     <!--  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 default -->
  |         <region name="/_default_">
  |          <attribute name="maxNodes">5</attribute>
  |          <attribute name="timeToLiveSeconds">10</attribute>
  | 	 <attribute name="maxAgeSeconds">15</attribute>
  |        </region>
  |       </config>
  |     </attribute>
  |     ...
  | 
persistence.properties  :

hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManager# Clustered cache with TreeCache
  | hibernate.cache.provider_class=org.jboss.ejb3.entity.TreeCacheProviderHook
  | hibernate.treecache.mbean.object_name=jboss.cache:service=TreeCache
  | hibernate.dialect=org.hibernate.dialect.SQLServerDialect
  | hibernate.jndi.java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
  | hibernate.jndi.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
  | hibernate.bytecode.use_reflection_optimizer=false
  | # I don't think this is honored, but EJB3Deployer uses it
  | hibernate.bytecode.provider=javassist
  | 

console log:

2006-08-02 14:17:15,807 DEBUG [org.jboss.cache.eviction.LRUConfiguration] parseConfig: name -- /_default_ maxNodes -- 5 
  | timeToLiveSeconds -- 10 maxAgeSeconds -- 15
  | 

I'm start project. JBoss cache successfully, but NumberOfNodes more then 5 and after 10 second cache not clear. Why? Where I'm wrong?

Thanks in advance.


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

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



More information about the jboss-user mailing list