1 Reply Latest reply on Dec 4, 2007 12:44 PM by manik

    Treecache - CacheLoader - Evicting not called when server is

    dmary

      Hi all,

      I try with a TreeCache, to backup my data stored previously from memory to disk or database, when I shutdown my JBOSS AS 4.0.5 GA (with JBossCache 1.4.0 SP1)

      Here is my config :

      <?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=MyTreeCache">
       <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="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">10000</attribute>
       <attribute name="timeToLiveSeconds">0</attribute>
       </region>
       </config>
       </attribute>
      
       <attribute name="CacheLoaderConfiguration">
       <config>
       <passivation>true</passivation>
       <shared>false</shared>
      
       <cacheloader>
       <class>org.jboss.cache.loader.JDBCCacheLoader</class>
       <properties>
       cache.jdbc.driver=com.mysql.jdbc.Driver
       cache.jdbc.url=jdbc:mysql://localhost:3306/test
       cache.jdbc.user=dummy
       cache.jdbc.password=dummy
       cache.jdbc.table.drop=false
       </properties>
       <async>false</async>
       <fetchPersistentState>true</fetchPersistentState>
       <ignoreModifications>false</ignoreModifications>
       <purgeOnStartup>false</purgeOnStartup>
       </cacheloader>
       </config>
       </attribute>
       </mbean>
      </server>
      


      I didn't see any call to CacheLoader in order to store memory datas when the server shutdown.
      What wrong with this ?