1 Reply Latest reply on Dec 1, 2008 7:23 AM by Dan Ives

    Default eviction queue not working - any form of 'catch-all'

    Dan Ives Newbie


      Currently as it stands we have been getting 98% eviction queue errors in our instances of JBoss. To solve the problem, we have found that we had to add these regions manually in ejb3-entity-cache-beans.xml

      However, we were under the assumption we shouldn't have to define these regions, as they would be covered under the /_default_ region, yet unless we manually specify it, there are no evictions performed.

      After some reading we find that we would have to manually add 60 entries into this document in order to evict them, or re-write our code and specify regions for each cache entity we have. We wondered if the default region should be doing this for us, or if there is any form of 'catch-all' we can add in?

      Obviously the best solution is for us to change the behaviour of our software for a long term solution, yet this will take us some time and we are looking for a way of resolving this issue asap - preferably without declaring 60 different eviction region configs.

      Thank-you, please see our settings attached

      <?xml version="1.0" encoding="UTF-8"?>
      <deployment xmlns="urn:jboss:bean-deployer:2.0">
       <!-- First we create a Configuration object for the cache -->
       <bean name="EJB3EntityCacheConfig"
       <!-- Externally injected services -->
       <property name="runtimeConfig">
       <bean name="EJB3EntityCacheRuntimeConfig" class="org.jboss.cache.config.RuntimeConfig">
       <property name="transactionManager"><inject bean="jboss:service=TransactionManager" property="TransactionManager"/></property>
       <property name="muxChannelFactory"><inject bean="JChannelFactory"/></property>
       <property name="multiplexerStack">${jboss.multiplexer.stack:udp}</property>
       <property name="clusterName">${jboss.partition.name:DefaultPartition}-EntityCache</property>
       Node locking level : SERIALIZABLE
       REPEATABLE_READ (default)
       <property name="isolationLevelString">REPEATABLE_READ</property>
       <!-- Valid modes are LOCAL
       <property name="cacheModeString">REPL_SYNC</property>
       <!-- The max amount of time (in milliseconds) we wait until the
       initial state (ie. the contents of the cache) are retrieved from
       existing members in a clustered environment
       <property name="stateRetrievalTimeout">15000</property>
       <!-- Number of milliseconds to wait until all responses for a
       synchronous call have been received.
       <property name="syncReplTimeout">20000</property>
       <!-- Max number of milliseconds to wait for a lock acquisition -->
       <property name="lockAcquisitionTimeout">15000</property>
       <property name="exposeManagementStatistics">true</property>
       <!-- Must be true if any entity deployment uses a scoped classloader -->
       <property name="useRegionBasedMarshalling">true</property>
       <!-- Must match the value of "useRegionBasedMarshalling" -->
       <property name="inactiveOnStartup">true</property>
       <!-- Specific eviction policy configurations. This is LRU -->
       <property name="evictionConfig">
       <bean name="EJB3EntityEvictionConfig" class="org.jboss.cache.config.EvictionConfig">
       <property name="defaultEvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</property>
       <property name="wakeupIntervalSeconds">3</property>
       <property name="evictionRegionConfigs">
       <!-- Default region will never timeout -->
       <bean name="EJB3EntityDefaultEvictionRegionConfig" class="org.jboss.cache.config.EvictionRegionConfig">
       <property name="regionName">/_default_</property>
       <property name="evictionPolicyConfig">
       <bean name="EJB3EntityDefaultLRUConfig" class="org.jboss.cache.eviction.LRUConfiguration">
       <property name="maxNodes">5000</property>
       <property name="timeToLiveSeconds">1000</property>
       <!-- EJB3 integration code will programatically create other
       regions as beans are deployed -->
       <!-- Manual addition to prevent eviction queue issue -->
       <bean name="ExchangeOpeningEntriesEvictionConfig" class="org.jboss.cache.config.EvictionRegionConfig">
       <property name="regionName">/zcapitalspreads_ear,services_jar,capital_spreads/exchange_opening_entries</property>
       <property name="evictionPolicyConfig">
       <bean name="ExchangeOpeningEntriesLRUConfig" class="org.jboss.cache.eviction.LRUConfiguration">
       <property name="maxNodes">5000</property>
       <property name="timeToLiveSeconds">1000</property>
       <bean name="BaseMarketEvictionRegionConfig" class="org.jboss.cache.config.EvictionRegionConfig">
       <property name="regionName">/zcapitalspreads_ear,services_jar,capital_spreads/base_market</property>
       <property name="evictionPolicyConfig">
       <bean name="BaseMarketLRUConfig" class="org.jboss.cache.eviction.LRUConfiguration">
       <property name="maxNodes">5000</property>
       <property name="timeToLiveSeconds">1000</property>
       <!-- Now we use the above configuration to construct the cache itself -->
       <bean name="EJB3EntityCache" class="org.jboss.cache.jmx.CacheJmxWrapper">
       <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=EJB3EntityTreeCache", exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
       <property name="configuration"><inject bean="EJB3EntityCacheConfig"/></property>