[jboss-user] [JBossCache] - Re: Node clear method bug or problem in my way to use it.

pitoui do-not-reply at jboss.com
Fri Dec 15 10:46:42 EST 2006


<?xml version="1.0" encoding="UTF-8" ?>
&lt;server&gt;
  &lt;classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar" /&gt;

  <!--  ====================================================================  -->
  <!--  Defines TreeCache configuration                                       -->
  <!--  ====================================================================  -->
  &lt;mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache"&gt;
    &lt;depends&gt;jboss:service=Naming&lt;/depends&gt;
    &lt;depends&gt;jboss:service=TransactionManager&lt;/depends&gt;


    <!-- Configure the TransactionManager -->
    &lt;attribute name="TransactionManagerLookupClass"&gt;org.jboss.cache.DummyTransactionManagerLookup&lt;/attribute&gt;

	<!-- 
			Node locking scheme : 
								PESSIMISTIC (default)
								OPTIMISTIC 
	-->
	&lt;attribute name="NodeLockingScheme"&gt;PESSIMISTIC&lt;/attribute&gt;		
<!--
            Node locking isolation level : 
								 SERIALIZABLE
                                 REPEATABLE_READ (default)
                                 READ_COMMITTED
                                 READ_UNCOMMITTED
                                 NONE

			(ignored if NodeLockingScheme is OPTIMISTIC)
    -->
    &lt;attribute name="IsolationLevel"&gt;REPEATABLE_READ&lt;/attribute&gt;

    <!--     Valid modes are LOCAL
                             REPL_ASYNC
                             REPL_SYNC
                             INVALIDATION_ASYNC
                             INVALIDATION_SYNC
    -->
    &lt;attribute name="CacheMode"&gt;LOCAL&lt;/attribute&gt;
    
    <!--  Whether each interceptor should have an mbean
        registered to capture and display its statistics.  -->
    &lt;attribute name="UseInterceptorMbeans"&gt;true&lt;/attribute&gt;

    <!-- Name of cluster. Needs to be the same for all clusters, in order
             to find each other -->
    &lt;attribute name="ClusterName"&gt;JBoss-Cache-Cluster&lt;/attribute&gt;
	 &lt;attribute name="ClusterConfig"&gt;
      &lt;config&gt;
        <!-- UDP: if you have a multihomed machine,
                set the bind_addr attribute to the appropriate NIC IP address
        -->
        <!-- UDP: On Windows machines, because of the media sense feature
                 being broken with multicast (even after disabling media sense)
                 set the loopback attribute to true
        -->
        &lt;UDP mcast_addr="228.1.2.3" mcast_port="45566" ip_ttl="64" ip_mcast="true"
           mcast_send_buf_size="150000" mcast_recv_buf_size="80000" ucast_send_buf_size="150000"
           ucast_recv_buf_size="80000" loopback="false" /&gt;
        &lt;PING timeout="2000" num_initial_members="3" up_thread="false" down_thread="false" /&gt;
        &lt;MERGE2 min_interval="10000" max_interval="20000" /&gt;
        &lt;FD shun="true" up_thread="true" down_thread="true" /&gt;
        &lt;VERIFY_SUSPECT timeout="1500" up_thread="false" down_thread="false" /&gt;
        &lt;pbcast.NAKACK gc_lag="50" max_xmit_size="8192" retransmit_timeout="600,1200,2400,4800" up_thread="false"
           down_thread="false" /&gt;
        &lt;UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10" down_thread="false" /&gt;
        &lt;pbcast.STABLE desired_avg_gossip="20000" up_thread="false" down_thread="false" /&gt;
        &lt;FRAG frag_size="8192" down_thread="false" up_thread="false" /&gt;
        &lt;pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="true" print_local_addr="true" /&gt;
        &lt;pbcast.STATE_TRANSFER up_thread="false" down_thread="false" /&gt;
      &lt;/config&gt;
    &lt;/attribute&gt;

    <!--    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
    -->
    &lt;attribute name="InitialStateRetrievalTimeout"&gt;5000&lt;/attribute&gt;
	 <!--    Number of milliseconds to wait until all responses for a
            synchronous call have been received.
    -->
    &lt;attribute name="SyncReplTimeout"&gt;10000&lt;/attribute&gt;

    <!--  Max number of milliseconds to wait for a lock acquisition -->
    &lt;attribute name="LockAcquisitionTimeout"&gt;15000&lt;/attribute&gt;

    <!--  Name of the eviction policy class. -->
    &lt;attribute name="EvictionPolicyClass"&gt;org.jboss.cache.eviction.LRUPolicy&lt;/attribute&gt;

    <!--  Specific eviction policy configurations. This is LRU -->
    &lt;attribute name="EvictionPolicyConfig"&gt;
      &lt;config&gt;
        &lt;attribute name="wakeUpIntervalSeconds"&gt;5&lt;/attribute&gt;
        <!--  Cache wide default -->
        &lt;region name="/_default_"&gt;
         &lt;attribute name="maxNodes"&gt;5000&lt;/attribute&gt;
         &lt;attribute name="timeToLiveSeconds"&gt;1000&lt;/attribute&gt;
         <!-- Maximum time an object is kept in cache regardless of idle time -->
         &lt;attribute name="maxAgeSeconds"&gt;120&lt;/attribute&gt;
       &lt;/region&gt;

       &lt;region name="/org/jboss/data"&gt;
         &lt;attribute name="maxNodes"&gt;5000&lt;/attribute&gt;
         &lt;attribute name="timeToLiveSeconds"&gt;1000&lt;/attribute&gt;
       &lt;/region&gt;

       &lt;region name="/org/jboss/test/data"&gt;
         &lt;attribute name="maxNodes"&gt;5&lt;/attribute&gt;
         &lt;attribute name="timeToLiveSeconds"&gt;4&lt;/attribute&gt;
       &lt;/region&gt;
      &lt;/config&gt;
    &lt;/attribute&gt;
	 <!-- New 1.3.x cache loader config block -->
        &lt;attribute name="CacheLoaderConfiguration"&gt;
            &lt;config&gt;
                <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
                &lt;passivation&gt;false&lt;/passivation&gt;
                &lt;preload&gt;&lt;/preload&gt;
                &lt;shared&gt;false&lt;/shared&gt;

                <!-- we can now have multiple cache loaders, which get chained -->
                &lt;cacheloader&gt;
                    &lt;class&gt;org.jboss.cache.loader.FileCacheLoader&lt;/class&gt;
                    <!-- same as the old CacheLoaderConfig attribute -->
                    &lt;properties&gt;
                        location=c:\dev\jbosscache
                    &lt;/properties&gt;
                    <!-- whether the cache loader writes are asynchronous -->
                    &lt;async&gt;false&lt;/async&gt;
                    <!-- only one cache loader in the chain may set fetchPersistentState to true.
                        An exception is thrown if more than one cache loader sets this to true. -->
                    &lt;fetchPersistentState&gt;true&lt;/fetchPersistentState&gt;
                    <!-- determines whether this cache loader ignores writes - defaults to false. -->
                    &lt;ignoreModifications&gt;false&lt;/ignoreModifications&gt;
                    <!-- if set to true, purges the contents of this cache loader when the cache starts up.
                    Defaults to false.  -->
                    &lt;purgeOnStartup&gt;false&lt;/purgeOnStartup&gt;
                &lt;/cacheloader&gt;

<!--                
                    org.jboss.cache.loader.JDBCCacheLoader
                    
                        cache.jdbc.driver=com.mysql.jdbc.Driver
                        cache.jdbc.url=jdbc:mysql://localhost:3306/jbossdb
                        cache.jdbc.user=root
                        cache.jdbc.password=
                    
                    true
                    false
                    true
                    false
                
-->
            &lt;/config&gt;
        &lt;/attribute&gt;


  &lt;/mbean&gt;
&lt;/server&gt;  

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994257#3994257

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994257



More information about the jboss-user mailing list