0 Replies Latest reply on Jan 11, 2011 6:43 AM by sangsvaib263

    POJO cache invalidate node issue in jboss cluster




      I am using JBoss-5.1.0 cluster for my application. Using POJO Cache, i have added listeners to call some custom methods when remote cluster node send invalidate messages.


      Invalidation is done properly but my listner method is not being called.


      Please help me in this respect.


      Cobfiguration of custom cache in jboss-cache-manager-jboss-beans.xml---




            <bean name="CustomMVCCEntityCache" class="org.jboss.cache.config.Configuration">


               <!-- Node locking scheme -->

               <property name="nodeLockingScheme">PESSIMISTIC</property>

               <!-- READ_COMMITTED is as strong as necessary for most

                    2nd Level Cache use cases. -->

               <property name="isolationLevel">READ_COMMITTED</property>

               <property name="useLockStriping">false</property>


               <!-- Mode of communication with peer caches.       

                    INVALIDATION_SYNC is highly recommended as the mode for use

                    with entity and collection caches.     -->

               <property name="cacheMode">INVALIDATION_SYNC</property>


               <!-- Name of cluster. Needs to be the same for all members -->

               <property name="clusterName">${jboss.partition.name:DefaultPartition}-custom</property>       

               <!-- Use a UDP (multicast) based stack. A udp-sync stack might be

                    slightly better (no JGroups FC) but we stick with udp to

                    help ensure this cache and others like timestamps-cache

                    that require FC can use the same underlying JGroups resources. -->

               <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>

               <!-- Whether or not to fetch state on joining a cluster. -->

               <property name="fetchInMemoryState">false</property>


               <!-- The max amount of time (in milliseconds) we wait until the

                 state (ie. the contents of the cache) are retrieved from

                 existing members at startup. Ignored if FetchInMemoryState=false. -->

               <property name="stateRetrievalTimeout">60000</property>


               <!-- Number of milliseconds to wait until all responses for a

                     synchronous call have been received. -->

               <property name="syncReplTimeout">17500</property>


               <!-- Max number of milliseconds to wait for a lock acquisition -->

               <property name="lockAcquisitionTimeout">15000</property>


               <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->

               <property name="useRegionBasedMarshalling">true</property>

               <!-- Must match the value of "useRegionBasedMarshalling" -->

               <property name="inactiveOnStartup">true</property>


               <!-- Disable asynchronous RPC marshalling/sending -->

               <property name="serializationExecutorPoolSize">0</property>       

               <!-- We have no asynchronous notification listeners -->

               <property name="listenerAsyncPoolSize">0</property>


               <property name="cacheLoaderConfig">

                  <bean class="org.jboss.cache.config.CacheLoaderConfig">

                         <!-- Do not change these -->

                         <property name="passivation">true</property>

                         <property name="shared">false</property>


                         <property name="individualCacheLoaderConfigs">


                              <bean class="org.jboss.cache.loader.FileCacheLoaderConfig">

                                 <!-- Where passivated sessions are stored -->

                                 <property name="location">${jboss.server.log.dir}${/}../../system/data/cache</property>

                                 <!-- Do not change these -->

                                 <property name="async">false</property>

                                 <property name="fetchPersistentState">true</property>

                                 <property name="purgeOnStartup">true</property>

                                 <property name="ignoreModifications">false</property>

                                 <property name="checkCharacterPortability">false</property>






               <property name="evictionConfig">

                   <bean class="org.jboss.cache.config.EvictionConfig">

                     <property name="wakeupInterval">5000</property>

                     <!--  Overall default -->

                     <property name="defaultEvictionRegionConfig">

                        <bean class="org.jboss.cache.config.EvictionRegionConfig">

                           <property name="regionName">/</property>

                           <property name="evictionAlgorithmConfig">

                              <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">

                                 <!-- Evict LRU node once we have more than this number of nodes -->

                                 <property name="maxNodes">1000</property>

                                 <!-- And, evict any node that hasn't been accessed in this many seconds -->

                                 <property name="timeToLiveSeconds">1000</property>

                                 <!-- Don't evict a node that's been accessed within this many seconds.

                                      Set this to a value greater than your max expected transaction length. -->

                                 <property name="minTimeToLiveSeconds">120</property>