0 Replies Latest reply on Jul 19, 2007 7:28 PM by BhaktavatsalamReddy

    :: Regarding CacheLoaders with Eviction Policies in Place ::

    BhaktavatsalamReddy Newbie

      Hi,
      I am quite new to the JBossCache. We are using JBossCache as the Second Level Cache.

      I wanted to know the relation between Eviction Policy and CacheLoader

      I have a couple of questions:
      What exactly happens when the Eviction Policy is in place withoutthe CacheLoader configuration?

      What exactly happens when the Eviction Policy is in place with the CacheLoader configuration?

      With the following configuration it has eaten up all of the available virtual memory to the extent, where in it is unable to swap further.
      ?

      <?xml version="1.0" encoding="UTF-8" ?>
      <server>
       <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar" />
      
       <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
       <depends>jboss:service=Naming</depends>
       <depends>jboss:service=TransactionManager</depends>
      
       <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
       <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
       <attribute name="IsolationLevel">NONE</attribute>
      
       <attribute name="CacheMode">LOCAL</attribute>
      
       <attribute name="UseInterceptorMbeans">false</attribute>
      
       <attribute name="LockAcquisitionTimeout">15000</attribute>
      
       <attribute name="EvictionPolicyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
      
       <attribute name="EvictionPolicyConfig">
       <config>
       <attribute name="wakeUpIntervalSeconds">5</attribute>
       <region name="/_default_">
       <attribute name="maxNodes">100</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       <region name="/CompanyImpl">
       <attribute name="maxNodes">10</attribute>
       <attribute name="timeToLiveSeconds">3600</attribute>
       <attribute name="maxAgeSeconds">3600</attribute>
       </region>
       <region name="/LicenseImpl">
       <attribute name="maxNodes">20</attribute>
       <attribute name="timeToLiveSeconds">3600</attribute>
       <attribute name="maxAgeSeconds">3600</attribute>
       </region>
       <region name="/CompanyImpl.licenses">
       <attribute name="maxNodes">5</attribute>
       <attribute name="timeToLiveSeconds">3600</attribute>
       <attribute name="maxAgeSeconds">3600</attribute>
       </region>
       <region name="/LicenseImpl.accounts">
       <attribute name="maxNodes">100</attribute>
       <attribute name="timeToLiveSeconds">300</attribute>
       <attribute name="maxAgeSeconds">300</attribute>
       </region>
       <region name="/AccountImpl">
       <attribute name="maxNodes">1000</attribute>
       <attribute name="timeToLiveSeconds">300</attribute>
       <attribute name="maxAgeSeconds">300</attribute>
       </region>
       <region name="/AccountImpl.folderList">
       <attribute name="maxNodes">1</attribute>
       <attribute name="timeToLiveSeconds">300</attribute>
       <attribute name="maxAgeSeconds">300</attribute>
       </region>
       <region name="/AccountAccessPlanImpl">
       <attribute name="maxNodes">10</attribute>
       <attribute name="timeToLiveSeconds">300</attribute>
       <attribute name="maxAgeSeconds">3600</attribute>
       </region>
       <region name="/EncoderImpl">
       <attribute name="maxNodes">50</attribute>
       <attribute name="timeToLiveSeconds">30</attribute>
       <attribute name="maxAgeSeconds">300</attribute>
       </region>
       <region name="/FolderImpl">
       <attribute name="maxNodes">500</attribute>
       <attribute name="timeToLiveSeconds">30</attribute>
       <attribute name="maxAgeSeconds">300</attribute>
       </region>
       <region name="/AssetMasterImpl">
       <attribute name="maxNodes">1000</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       <region name="/AssetMasterImpl.assets">
       <attribute name="maxNodes">25</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       <region name="/AssetMasterImpl.encodingRequestImplList">
       <attribute name="maxNodes">25</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       <region name="/AssetImpl">
       <attribute name="maxNodes">1000</attribute>
       <attribute name="timeToLiveSeconds">30</attribute>
       <attribute name="maxAgeSeconds">60</attribute>
       </region>
       <region name="/AccountAttributeImpl">
       <attribute name="maxNodes">1000</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       <region name="/AssetMasterAttributeImpl">
       <attribute name="maxNodes">1000</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       <region name="/AssetAttributeImpl">
       <attribute name="maxNodes">1000</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       <region name="/AccountImpl.attributeList">
       <attribute name="maxNodes">30</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       <region name="/AssetMasterImpl.attributeList">
       <attribute name="maxNodes">30</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       <region name="/AssetImpl.attributeList">
       <attribute name="maxNodes">30</attribute>
       <attribute name="timeToLiveSeconds">10</attribute>
       <attribute name="maxAgeSeconds">30</attribute>
       </region>
       </config>
       </attribute>
      <!-- <attribute name="FetchInMemoryState">true</attribute> -->
       <attribute name="CacheLoaderConfiguration">
       <config>
       <passivation>false</passivation>
       <shared>false</shared>
      
       <cacheloader>
       <class>org.jboss.cache.loader.FileCacheLoader</class>
       <properties>
       location=treecache
       </properties>
       <async>false</async>
       <fetchPersistentState>true</fetchPersistentState>
       <ignoreModifications>false</ignoreModifications>
       <purgeOnStartup>true</purgeOnStartup>
       </cacheloader>
       </config>
       </attribute>
       </mbean>
      </server>
      


      Please not that passivation is false

      Please let know what happens with above config and so that I can configure in the right manner.

      Thanks,
      Bhakta