2 Replies Latest reply on Jan 24, 2005 1:08 PM by Ben Wang

    persistPolicy on TreeCache??

    Jarva Jarva Newbie

      iI'm trying to implements persistence policy on my TreeCache, but if I try it by the same way as the example give in jboss/doc/examples, I can't do it. My "treecache-service.xml" is like this:







      <!-- ==================================================================== -->
      <!-- Defines TreeCache configuration -->
      <!-- ==================================================================== -->



      jboss:service=Naming
      jboss:service=TransactionManager


      PersistentTreeCache


      <!-- THIS IS IMPORTANT -->
      <persistence-manager value="org.jboss.mx.persistence.DelegatingPersistenceManager"/>

      <!-- May use a different external AttributePersistenceService; default should be ok.


      -->

      org.jboss.cache.TreeCache

      LockAcquisitionTimeout
      long



      qnecta/servicio/treecache/TreeCache
      ......

      But when I make some modify on console, my xml isn't modify (on deploy directory). What are wrong??

        • 1. Re: persistPolicy on TreeCache??
          Jarva Jarva Newbie

          sorry. the xml is like this:

          <mbean code="org.jboss.cache.TreeCache"
           name="jboss.cache:service=TreeCache">
          
           <depends>jboss:service=Naming</depends>
           <depends>jboss:service=TransactionManager</depends>
          
           <xmbean>
           <description>PersistentTreeCache</description>
           <descriptors>
           <persistence persistPolicy="OnUpdate"/>
           <!-- THIS IS IMPORTANT -->
           <persistence-manager value="org.jboss.mx.persistence.DelegatingPersistenceManager"/>
          
           <!-- May use a different external AttributePersistenceService; default should be ok.
           <descriptor name="attribute-persistence-service" value="jboss:service=AttributePersistenceService"/>
           <descriptor name="attribute-persistence-operation" value="apmCreate"/>
           -->
           </descriptors>
           <class>org.jboss.cache.TreeCache</class>
           <attribute access="read-write" getMethod="getLockAcquisitionTimeout" setMethod="setLockAcquisitionTimeout">
           <name>LockAcquisitionTimeout</name>
           <type>long</type>
           </attribute>
           </xmbean>
          
           <attribute name="JndiName">qnecta/servicio/treecache/TreeCache</attribute>
          
           <!--
           Configure the TransactionManager
           -->
           <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
          


          • 2. Re: persistPolicy on TreeCache??
            Ben Wang Master

            JBossCache xml won't accept your xmbean element. If you want to have different persistent policy, you will need a different CacheLoader, if this is what you are after.

            -Ben