Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-93

RMI Remote cache update events not getting propagated to JCS clients on Solaris.

    XMLWordPrintableJSON

    Details

      Description

      We have implemented JCS RMI Remote cache to build a Primary(JCS Remote Cache Server- 1) and another Failover (JCS Remote Cache Server-2) cache servers to be used by our enterprise Web application deployed on Weblogic cluster of 8 instances. We have JCS RMI client running on the application instances and they need to keep a local copy of the cached object in memory on the local JVM instances. The Remote cache gets some updates in the caches objects, ideally it has to propagate the update event to the local caches which are registered the listener for Remote cache. This is not working as expected. What we have seen is, the events are getting propagated between Primary(JCS Remote Cache Server- 1) and another Failover (JCS Remote Cache Server-2), but the same is not getting propagated to the other RMI JCS clients running on the Weblogic cluster. Which is causing the local cached copy of the cahced objects on clients remain stale and do not get updated when remote cache gets updated. Below is the .ccf files for Primary(JCS Remote Cache Server- 1), Failover (JCS Remote Cache Server-2) and one of the remote client JCS-

      Primary(JCS Remote Cache Server- 1) cache.ccf
      ###########################

      1. Registry used to register and provide the IRemoteCacheService service
        ###########################
        registry.host=myserver4.com
        registry.port=1104
        remote.cache.service.port=1104
        remote.cluster.LocalClusterConsistency=true
        remote.cluster.AllowClusterGet=false
                                                          1. Default Region Configuration ###########################
                                                            jcs.default=indexedDiskCache,failOverCache
                                                            jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
                                                            jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
                                                            jcs.default.cacheattributes.MaxObjects=5000000
                                                            jcs.default.cacheattributes.UseMemoryShrinker=true
                                                            jcs.default.cacheattributes.ShrinkerIntervalSeconds=5
                                                            jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=15
                                                            #jcs.default.cacheattributes.MaxSpoolPerRun=25
                                                            jcs.default.cacheattributes.DiskUsagePatternName=SWAP
                                                          1. Indexed Disk Cache ###########################
                                                            jcs.auxiliary.indexedDiskCache=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
                                                            jcs.auxiliary.indexedDiskCache.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
                                                            jcs.auxiliary.indexedDiskCache.attributes.DiskPath=/sites/dummy/site/common/tmp/mycache/primary
                                                            jcs.auxiliary.indexedDiskCache.attributes.MaxPurgatorySize=-1
                                                            jcs.auxiliary.indexedDiskCache.attributes.MaxKeySize=500000
                                                            jcs.auxiliary.indexedDiskCache.attributes.MaxRecycleBinSize=50000
                                                            jcs.auxiliary.indexedDiskCache.attributes.OptimizeAtRemoveCount=300000
                                                            jcs.auxiliary.indexedDiskCache.attributes.EventQueueType=POOLED
                                                            jcs.auxiliary.indexedDiskCache.attributes.EventQueuePoolName=commonThreadPool
                                                            jcs.auxiliary.indexedDiskCache.attributes.OptimizeOnShutdown=true
                                                          1. AUXILIARY CLUSTERD CACHES FOR CLUSTER ###########################
                                                            jcs.auxiliary.failOverCache=org.apache.jcs.auxiliary.remote.RemoteCacheFactory
                                                            jcs.auxiliary.failOverCache.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes
                                                            jcs.auxiliary.failOverCache.attributes.RemoteTypeName=CLUSTER
                                                            jcs.auxiliary.failOverCache.attributes.RemoveUponRemotePut=false
                                                            jcs.auxiliary.failOverCache.attributes.ClusterServers=myserver03.com:1103
                                                            jcs.auxiliary.failOverCache.attributes.EventQueueType=POOLED
                                                            jcs.auxiliary.failOverCache.attributes.ThreadPoolName=commonThreadPool
                                                            jcs.auxiliary.failOverCache.attributes.GetOnly=false
                                                            jcs.auxiliary.failOverCache.attributes.GetTimeoutMillis=1800000000
                                                            jcs.auxiliary.failOverCache.attributes.RmiSocketFactoryTimeoutMillis=3000000
                                                          1. DEFAULT THREAD POOL CONFIGURATION ###########################
      1. Default thread pool config
        thread_pool.default.useBoundary=true
        thread_pool.default.startUpSize=4
        thread_pool.default.minimumPoolSize=4
        thread_pool.default.maximumPoolSize=150
        thread_pool.default.boundarySize=2000
        thread_pool.default.keepAliveTime=350000
        thread_pool.default.whenBlockedPolicy=RUN
                                                          1. Disk Cache pool ###########################
                                                            thread_pool.commonThreadPool.useBoundary=true
                                                            thread_pool.commonThreadPool.startUpSize=10
                                                            thread_pool.commonThreadPool.minimumPoolSize=10
                                                            thread_pool.commonThreadPool.maximumPoolSize=200
                                                            thread_pool.commonThreadPool.keepAliveTime=350000
                                                            thread_pool.commonThreadPool.whenBlockedPolicy=RUN

      #######################################################################################################################################
      #######################################################################################################################################

      1. Cache Regions
        #######################################################################################################################################
        #######################################################################################################################################
        jcs.region.locatorCore=indexedDiskCache,failOverCache
        jcs.region.locatorCore.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
        jcs.region.locatorCore.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
        jcs.region.locatorCore.cacheattributes.MaxObjects=100
        jcs.region.locatorCore.cacheattributes.UseMemoryShrinker=false
        jcs.region.locatorCore.cacheattributes.ShrinkerIntervalSeconds=10
        jcs.region.locatorCore.cacheattributes.MaxMemoryIdleTimeSeconds=120
        #jcs.region.locatorCore.cacheattributes.DiskUsagePatternName=SWAP

      Failover (JCS Remote Cache Server-2) cache.ccf -
      ###########################

      1. Registry used to register and provide the IRemoteCacheService service
        ###########################
        registry.host=myserver3.com
        registry.port=1103
        remote.cache.service.port=1103
        remote.cluster.LocalClusterConsistency=true
        remote.cluster.AllowClusterGet=false
                                                          1. Default Region Configuration ###########################
                                                            jcs.default=indexedDiskCache,primaryCache
                                                            jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
                                                            jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
                                                            jcs.default.cacheattributes.MaxObjects=5000000
                                                            jcs.default.cacheattributes.UseMemoryShrinker=true
                                                            jcs.default.cacheattributes.ShrinkerIntervalSeconds=5
                                                            jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=15
                                                            #jcs.default.cacheattributes.MaxSpoolPerRun=25
                                                            jcs.default.cacheattributes.DiskUsagePatternName=SWAP
                                                          1. Indexed Disk Cache ###########################
                                                            jcs.auxiliary.indexedDiskCache=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
                                                            jcs.auxiliary.indexedDiskCache.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
                                                            jcs.auxiliary.indexedDiskCache.attributes.DiskPath=/sites/dummy/site/common/tmp/mycache/failover
                                                            jcs.auxiliary.indexedDiskCache.attributes.MaxPurgatorySize=-1
                                                            jcs.auxiliary.indexedDiskCache.attributes.MaxKeySize=500000
                                                            jcs.auxiliary.indexedDiskCache.attributes.MaxRecycleBinSize=50000
                                                            jcs.auxiliary.indexedDiskCache.attributes.OptimizeAtRemoveCount=300000
                                                            jcs.auxiliary.indexedDiskCache.attributes.EventQueueType=POOLED
                                                            jcs.auxiliary.indexedDiskCache.attributes.EventQueuePoolName=commonThreadPool
                                                            jcs.auxiliary.indexedDiskCache.attributes.OptimizeOnShutdown=true
                                                          1. AUXILIARY CLUSTERD CACHES FOR CLUSTER ###########################
                                                            jcs.auxiliary.primaryCache=org.apache.jcs.auxiliary.remote.RemoteCacheFactory
                                                            jcs.auxiliary.primaryCache.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes
                                                            jcs.auxiliary.primaryCache.attributes.RemoteTypeName=CLUSTER
                                                            jcs.auxiliary.primaryCache.attributes.RemoveUponRemotePut=false
                                                            jcs.auxiliary.primaryCache.attributes.ClusterServers=myserver4.com:1104
                                                            jcs.auxiliary.primaryCache.attributes.EventQueueType=POOLED
                                                            jcs.auxiliary.primaryCache.attributes.ThreadPoolName=commonThreadPool
                                                            jcs.auxiliary.primaryCache.attributes.GetOnly=false
                                                            jcs.auxiliary.primaryCache.attributes.GetTimeoutMillis=1800000000
                                                            jcs.auxiliary.primaryCache.attributes.RmiSocketFactoryTimeoutMillis=3000000
                                                          1. DEFAULT THREAD POOL CONFIGURATION ###########################
      1. Default thread pool config
        thread_pool.default.useBoundary=true
        thread_pool.default.startUpSize=4
        thread_pool.default.minimumPoolSize=4
        thread_pool.default.maximumPoolSize=150
        thread_pool.default.boundarySize=2000
        thread_pool.default.keepAliveTime=350000
        thread_pool.default.whenBlockedPolicy=RUN
                                                          1. Disk Cache pool ###########################
                                                            thread_pool.commonThreadPool.useBoundary=true
                                                            thread_pool.commonThreadPool.startUpSize=10
                                                            thread_pool.commonThreadPool.minimumPoolSize=10
                                                            thread_pool.commonThreadPool.maximumPoolSize=200
                                                            thread_pool.commonThreadPool.keepAliveTime=350000
                                                            thread_pool.commonThreadPool.whenBlockedPolicy=RUN

      #######################################################################################################################################
      #######################################################################################################################################

      1. Cache Regions
        #######################################################################################################################################
        #######################################################################################################################################
        jcs.region.locatorCore=indexedDiskCache,primaryCache
        jcs.region.locatorCore.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
        jcs.region.locatorCore.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
        jcs.region.locatorCore.cacheattributes.MaxObjects=100
        jcs.region.locatorCore.cacheattributes.UseMemoryShrinker=false
        jcs.region.locatorCore.cacheattributes.ShrinkerIntervalSeconds=10
        jcs.region.locatorCore.cacheattributes.MaxMemoryIdleTimeSeconds=120
        #jcs.region.locatorCore.cacheattributes.DiskUsagePatternName=SWAP

      JCS RMI Remote cache client cache.ccf -

                                                        1. REMOTE CACHE #########################

      jcs.auxiliary.remoteCache=org.apache.jcs.auxiliary.remote.RemoteCacheFactory
      jcs.auxiliary.remoteCache.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes
      jcs.auxiliary.remoteCache.attributes.FailoverServers=myserver3.com:1103,myserver4.com:1104
      jcs.auxiliary.remoteCache.attributes.RemoveUponRemotePut=true
      jcs.auxiliary.remoteCache.attributes.RmiSocketFactoryTimeoutMillis=120000
      jcs.auxiliary.remoteCache.attributes.GetOnly=true

      ##############################################################################

                                                        1. Remote Cache Regions #############################
                                                          ##############################################################################
                                                          1. REMOTE CACHE - auxillary Disk cache ###########################

      jcs.auxiliary.remoteCacheDiskAux=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
      jcs.auxiliary.remoteCacheDiskAux.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
      jcs.auxiliary.remoteCacheDiskAux.attributes.DiskPath=mycluster_instance001_cache_repos/remote_region
      jcs.auxiliary.remoteCacheDiskAux.attributes.MaxPurgatorySize=10000
      jcs.auxiliary.remoteCacheDiskAux.attributes.MaxKeySize=10000
      jcs.auxiliary.remoteCacheDiskAux.attributes.OptimizeAtRemoveCount=300000
      jcs.auxiliary.remoteCacheDiskAux.attributes.OptimizeOnShutdown=true
      jcs.auxiliary.remoteCacheDiskAux.attributes.MaxRecycleBinSize=7500

                                                          1. CACHE REGION - locatorCore ###########################
                                                            jcs.region.locatorCore=remoteCache
                                                            jcs.region.locatorCore.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
                                                            jcs.region.locatorCore.cacheattributes.MaxObjects=50
                                                            jcs.region.locatorCore.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
                                                            jcs.region.locatorCore.cacheattributes.UseMemoryShrinker=true
                                                            jcs.region.locatorCore.cacheattributes.ShrinkerIntervalSeconds=300
                                                            jcs.region.locatorCore.cacheattributes.MaxMemoryIdleTimeSeconds=120
                                                            jcs.region.locatorCore.cacheattributes.MaxSpoolPerRun=25
                                                            jcs.region.locatorCore.elementattributes.IsEternal=false
                                                            jcs.region.locatorCore.elementattributes.MaxLifeSeconds=3600

      We ran some small tests for a demo/POC on Windows OS and the even updates are recieved from RMI remote JCS cache to the local client. But our deployment OS is Solaris 10 and when we are deploying there , the events are not propagated.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tv Thomas Vandahl
                Reporter:
                brajeshchhotan Brajesh Chhotan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: