3 Replies Latest reply on Feb 22, 2007 11:37 AM by manik

    how do i clean (remove) all nodes from a cache loader?

      I use JDBCCache for a fast start up.

      Sometimes i want to reload the cache from the begining (when some application configuration is changed).
      i saw that if i remove every thing from the cache, the cache laoder does not delete records from DB. i want to make sure that if the server will be shuted down, the old data won't be loaded.

      how do i clean it?

        • 1. Re: how do i clean (remove) all nodes from a cache loader?
          manik

          The cache loader should always reflect removes.

          Make sure you're not using the cache loader in async mode, perhaps?

          • 2. Re: how do i clean (remove) all nodes from a cache loader?

            I'm not using async mode.

            i made sure the cache is empty (nodes are not found anymore). but the JDBCCacheLoader's table content did not change.

            i'm using JBossCache-all-2.0.0.ALPHA2 deployed on jboss-4.0.3SP1.

            with the following configuration:

            <attribute name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
             <attribute name="IsolationLevel">READ_COMMITTED</attribute>
            
             <attribute name="CacheMode">LOCAL</attribute>
             <attribute name="CacheLoaderConfiguration">
             <config>
             <passivation>false</passivation>
             <preload>/</preload>
             <shared>true</shared>
            
             <cacheloader>
             <!--<class>org.jboss.cache.loader.FileCacheLoader</class>-->
             <!--<properties>-->
             <!--location=d:\temp\jc-->
             <!--</properties>-->
             <class>org.jboss.cache.loader.JDBCCacheLoader</class>
             <properties>
             cache.jdbc.table.name=jbosscache_application
             cache.jdbc.table.create=true
             cache.jdbc.table.drop=true
             cache.jdbc.table.primarykey=jbosscache_application_pk
             cache.jdbc.fqn.column=fqn
             cache.jdbc.fqn.type=varchar(255)
             cache.jdbc.node.column=node
             cache.jdbc.node.type=blob
             cache.jdbc.parent.column=parent
             cache.jdbc.datasource=java:/beDS
             </properties>
            
             <async>false</async>
             <fetchPersistentState>false</fetchPersistentState>
             <ignoreModifications>false</ignoreModifications>
             <purgeOnStartup>false</purgeOnStartup>
             </cacheloader>
             </config>
             </attribute>


            What can explain this behaviour?

            • 3. Re: how do i clean (remove) all nodes from a cache loader?
              manik

              I'd recomend trying out BETA1, which should be out in a few days - the JDBC cache loader has been changed a lot.