jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <asm...@yahoo.com>
Subject Re: Remote cache is only working one way
Date Thu, 04 Mar 2010 02:12:00 GMT
I'm not sure what's going on, but you don't have the remote listener fully configured on the
client side.

Aaron

--- On Tue, 2/23/10, Brian Engen <bengen@nighthawkrad.net> wrote:

> From: Brian Engen <bengen@nighthawkrad.net>
> Subject: Remote cache is only working one way
> To: "jcs-users@jakarta.apache.org" <jcs-users@jakarta.apache.org>
> Cc: "Mike Gentili" <mgentili@nighthawkrad.net>
> Date: Tuesday, February 23, 2010, 12:17 PM
> Hey all,
> 
> I'm struggling to get my remote cache working
> correctly.  My clients can connect and add listeners to
> my remote cache server, but my remote cache server is not
> publishing any events when a change is made to any of that
> server's caches.  I think this may be because when the
> remote cache servlet starts up, it looks like it parses the
> cache.ccf file for any existing cache regions to listen
> to.  With my config, there are none pre-defined. 
> I always use the default region to create my caches
> dynamically.  I need some way for these dynamic caches
> to publish change events to my remote cache server so it
> can, in turn, publish those events to my clients.
> 
> I've tried such things as adding a Remote Cache to my
> server's default config that's connected to the remote cache
> server at localhost where GetOnly is false and  Receive
> is false, but have always gotten errors on startup - maybe I
> was just configuring it wrong?  I've also tried
> programmatically getting the remote cache manager whenever I
> create one of my dynamic disk caches and adding a
> listener.  This worked for publishing updates, but
> gets/puts no longer worked.  Thanks in advance for any
> help or guidance you can provide.  My client and server
> cache.ccf files are below.  If any code I'm using would
> be helpful, let me know and I'd be happy to provide it.
> 
> ===== CLIENT =====
> #DEFAULT CLIENT CACHE REGION
> jcs.default=DC, RFailover
> jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> jcs.default.cacheattributes.UseMemoryShrinker=true
> jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> jcs.default.cacheattributes.MaxObjects=50
> 
> # PRE-DEFINED CACHE REGIONS
> jcs.region.runtime=DCR
> jcs.region.runtime.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> jcs.region.runtime.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> jcs.region.runtime.cacheattributes.UseMemoryShrinker=true
> jcs.region.runtime.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> jcs.region.runtime.cacheattributes.MaxObjects=50
> jcs.region.runtime.cacheattributes.UseRemote=false
> 
> #  AVAILABLE AUXILIARY CACHES
> ## Disk Cache - Default
> jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
> jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
> jcs.auxiliary.DC.attributes.DiskPath=${user.home}/cache/client
> jcs.auxiliary.DC.attributes.MaxKeySize=15000
> 
> ## Disk Cache - Runtime
> jcs.auxiliary.DCR=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
> jcs.auxiliary.DCR.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
> jcs.auxiliary.DCR.attributes.DiskPath=${user.home}/cache/client
> jcs.auxiliary.DCR.attributes.ClearDiskOnStartup=true
> jcs.auxiliary.DCR.attributes.MaxKeySize=15000
> 
> ## Remote RMI Cache
> jcs.auxiliary.RFailover=org.apache.jcs.auxiliary.remote.RemoteCacheFactory
> jcs.auxiliary.RFailover.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes
> jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:1201
> jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=false
> jcs.auxiliary.RFailover.attributes.GetOnly=true
> jcs.auxiliary.RFailover.attributes.Receive=true
> 
> ===== SERVER =====
> ##############################################################
> ################## REMOTE SERVER CONFIG
> ######################
> # Registry used to register and provide the
> IRmiCacheService service.
> registry.host=localhost
> registry.port=1201
> remote.cache.service.port=1201
> remote.cache.attributes.RemoveUponRemotePut=false
> remote.cache.attributes.GetOnly=false
> remote.cache.attributes.Receive=false
> remote.cluster.LocalClusterConsistency=true
> 
> ##############################################################
> ################## DEFAULT CACHE REGION
> #####################
> # sets the default aux value for any non configured caches
> jcs.default=DC
> jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> jcs.default.cacheattributes.MaxObjects=100
> jcs.default.cacheattributes.UseMemoryShrinker=true
> jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
> jcs.default.cacheattributes.UseRemote=false
> 
> ##############################################################
> ################## CACHE REGIONS AVAILABLE
> ###################
> # Regions preconfirgured for caching
> 
> # NONE - Always use default
> 
> 
> # Primary Disk Cache-- faster than the rest because of
> memory key storage
> jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
> jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
> jcs.auxiliary.DC.attributes.DiskPath=${user.home}
> /cache/server
> jcs.auxiliary.DC.attributes.ClearDiskOnStartup=true
> jcs.auxiliary.DC.attributes.MaxKeySize=150000
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message