0 Replies Latest reply on Oct 29, 2009 1:43 PM by Miguel Ramos

    Configuration question

    Miguel Ramos Newbie

      Hi! Sorry for the cross-posting, but it's really urgent!

      I'm currently migrating our JBoss Cluster from 4.2.3 to 5.1.0. We already have almost everything working, just a small piece is missing: Pojo Cache.
      We make heavy use of this feature, so all/any help on this is much appreciated!

      My configuration in JBossAS 4.2.3 is:

      cat jboss423/server/all/deploy/pojocache-service.xml:
      Code:

      <?xml version="1.0" encoding="UTF-8" ?>
      <server>
       <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
      
       <mbean code="org.jboss.cache.aop.PojoCache"
       name="jboss.cache:service=PojoCache">
      
       <depends>jboss:service=Naming</depends>
      <!-- <depends>jboss:service=TransactionManager</depends> -->
       <!-- Configure the TransactionManager -->
      <!-- <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute> -->
      
      
      
       <!-- Isolation level : SERIALIZABLE
       REPEATABLE_READ (default)
       READ_COMMITTED
       READ_UNCOMMITTED
       NONE
       -->
      
       <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
      
       <!-- Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC -->
       <attribute name="CacheMode">REPL_ASYNC</attribute>
      
       <!-- Name of cluster. Needs to be the same for all caches, in order for them to find each other -->
      
       <attribute name="ClusterName">${jboss.partition.name:DefaultPartition}-PojoCacheCluster</attribute>
      
       <!-- JGroups protocol stack properties. -->
       <attribute name="ClusterConfig">
       <config>
       <!-- UDP: if you have a multihomed machine, set the bind_addr attribute to the appropriate NIC IP a
      ddress -->
      
       <!-- UDP: On Windows machines, because of the media sense feature being broken with multicast (even a
      fter disabling media sense) set the loopback attribute to true -->
      
       <UDP
       mcast_addr="${jboss.partition.udpGroup:228.1.2.3}"
       mcast_port="${jboss.ejb3sfsbpartition.mcast_port:48866}"
       ip_mcast="true"
       tos="8"
       ucast_recv_buf_size="20000000"
       ucast_send_buf_size="640000"
       mcast_recv_buf_size="25000000"
       mcast_send_buf_size="640000"
       loopback="false"
       discard_incompatible_packets="true"
       max_bundle_size="64000"
       max_bundle_timeout="30"
       use_incoming_packet_handler="true"
       ip_ttl="${jgroups.udp.ip_ttl:2}"
       enable_bundling="true"
       enable_diagnostics="true"
       thread_naming_pattern="cl"
      
       use_concurrent_stack="true"
      
       thread_pool.enabled="true"
       thread_pool.min_threads="2"
       thread_pool.max_threads="8"
       thread_pool.keep_alive_time="5000"
       thread_pool.queue_enabled="true"
       thread_pool.queue_max_size="1000"
       thread_pool.rejection_policy="discard"
      
       oob_thread_pool.enabled="true"
       oob_thread_pool.min_threads="1"
       oob_thread_pool.max_threads="8"
       oob_thread_pool.keep_alive_time="5000"
       oob_thread_pool.queue_enabled="false"
       oob_thread_pool.queue_max_size="100"
       oob_thread_pool.rejection_policy="Run"/>
      
      
       <PING timeout="2000"
       num_initial_members="2"/>
       <MERGE2 min_interval="10000"
       max_interval="20000"/>
       <FD_SOCK/>
       <FD timeout="10000" max_tries="5" shun="true"/>
       <VERIFY_SUSPECT timeout="1500"/>
       <pbcast.NAKACK use_stats_for_retransmission="false"
       exponential_backoff="150"
       use_mcast_xmit="true" gc_lag="0"
       retransmit_timeout="50,300,600,1200"
       discard_delivered_msgs="true"/>
       <UNICAST timeout="300,600,1200"/>
       <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
       max_bytes="1000000"/>
       <VIEW_SYNC avg_send_interval="60000" />
       <FC max_credits="500000"
       min_threshold="0.20"/>
       <FRAG2 frag_size="60000" />
       <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
       shun="true" print_local_addr="true"/>
       <pbcast.STATE_TRANSFER/>
       </config>
       </attribute>
      
       <!-- Whether or not to fetch state on joining a cluster -->
       <attribute name="FetchInMemoryState">false</attribute>
      
       <!-- The max amount of time (in milliseconds) we wait until the initial state (ie. the contents of t
      he cache) are retrieved from existing members in a clustered environment -->
       <attribute name="InitialStateRetrievalTimeout">15000</attribute>
      
       <!-- Number of milliseconds to wait until all responses for a synchronous call have been received.
       -->
       <attribute name="SyncReplTimeout">15000</attribute>
      
       <!-- Max number of milliseconds to wait for a lock acquisition -->
       <attribute name="LockAcquisitionTimeout">10000</attribute>
      
       <!-- Specific eviction policy configurations. This is LRU -->
       <attribute name="EvictionPolicyConfig">
       <config>
       <attribute name="wakeUpIntervalSeconds">5</attribute>
       <attribute name="policyClass">org.jboss.cache.eviction.LRUPolicy</attribute>
       <!-- Cache wide default -->
       <region name="/_default_" policyClass="org.jboss.cache.eviction.LRUPolicy">
       <attribute name="maxNodes">0</attribute>
       <attribute name="timeToLiveSeconds">86400</attribute>
       </region>
       </config>
       </attribute>
      
       <attribute name="CacheLoaderConfiguration">
       <config>
       <passivation>true</passivation>
       <preload>/</preload>
       <shared>false</shared>
      
       <!-- we can now have multiple cache loaders, which get chained -->
       <cacheloader>
       <class>org.jboss.cache.loader.FileCacheLoader</class>
       <!-- whether the cache loader writes are asynchronous -->
       <async>false</async>
       <!-- 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. -->
       <fetchPersistentState>true</fetchPersistentState>
       <!-- determines whether this cache loader ignores writes - defaults to false. -->
       <ignoreModifications>false</ignoreModifications>
       </cacheloader>
       </config>
       </attribute>
       </mbean>
      </server>
      
      



      In my work to migrate this config to something equal in jboss 5.1.0, I got something like this.

      cat jboss510/server/all/deploy/pojocache-service.xml:
      Code:
      <?xml version="1.0" encoding="UTF-8" ?>
      
      <server>
       <mbean code="org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper"
       name="jboss.cache:service=PojoCache">
      
       <depends>jboss:service=TransactionManager</depends>
      
       <!-- Configure the TransactionManager >
       <attribute name="TransactionManagerLookupClass">
       org.jboss.cache.transaction.DummyTransactionManagerLookup
       </attribute-->
      
       <!-- Isolation level : SERIALIZABLE
       REPEATABLE_READ (default)
       READ_COMMITTED
       READ_UNCOMMITTED
       NONE
       -->
       <attribute name="IsolationLevel">READ_COMMITTED</attribute>
      
       <!-- Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC -->
       <attribute name="CacheMode">REPL_ASYNC</attribute>
      
       <!-- Name of cluster. Needs to be the same for all caches,
       in order for them to find each other
       -->
       <attribute name="ClusterName">PojoCacheCluster</attribute>
      
       <!-- JGroups protocol stack properties. -->
       <attribute name="ClusterConfig">
       <config>
       <!-- 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 -->
       <UDP mcast_addr="228.1.2.3" mcast_port="48866"
       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"/>
       <PING timeout="2000" num_initial_members="3"/>
       <MERGE2 min_interval="10000" max_interval="20000"/>
       <FD shun="true"/>
       <FD_SOCK/>
       <VERIFY_SUSPECT timeout="1500"/>
       <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
       max_xmit_size="8192"/>
       <UNICAST timeout="600,1200,2400,4800"/>
       <pbcast.STABLE desired_avg_gossip="400000"/>
       <FC max_credits="2000000" min_threshold="0.10"/>
       <FRAG2 frag_size="8192"/>
       <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
       shun="true" print_local_addr="true"/>
       <pbcast.STATE_TRANSFER/>
       </config>
       </attribute>
      
       <!-- Whether or not to fetch state on joining a cluster -->
       <attribute name="FetchInMemoryState">false</attribute>
      
       <!-- 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
       -->
       <attribute name="InitialStateRetrievalTimeout">15000</attribute>
      
       <!-- Number of milliseconds to wait until all responses for a
       synchronous call have been received.
       -->
       <attribute name="SyncReplTimeout">15000</attribute>
      
       <!-- Max number of milliseconds to wait for a lock acquisition -->
       <attribute name="LockAcquisitionTimeout">10000</attribute>
      
       </mbean>
      </server>
      
      



      The problem is i can't define an eviction policy and/or maxNodes attribute. I know i'm doing something wrong (obviously), but i can't undestand what.

      Examples on how to configure this properly are welcome!
      Regards,
      Miguel