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: RemoveUponRemotePut not working.
Date Sun, 12 Jul 2009 23:18:47 GMT

Are you sure that the client is connected to the server?  The server logs should indicate
a connection.  And the client status should not be in error.  

Aaron



--- On Fri, 7/10/09, Avanti Nagalia <ANagalia@manh.com> wrote:

> From: Avanti Nagalia <ANagalia@manh.com>
> Subject: RemoveUponRemotePut not working.
> To: jcs-users@jakarta.apache.org
> Date: Friday, July 10, 2009, 1:16 PM
> I'm trying a POC for synching local
> caches in a cluster. I'm using JCS
> Remote Cache server for the same. I have set up the server
> in Tomcat on
> my local box and am running two clients on my local machine
> as well. I
> would like to enable data invalidation instead of data
> replication
> across the clients, hence have set the property
> RemoveUponRemotePut to
> true. What I understand from this property is that if a
> cache element is
> present on both clients and client1 updates its local copy,
> then a
> remove request will be issued for client2 so that the next
> request for
> that element will force client2 to go to the DB to retrieve
> a fresh copy
> of the element, hence maintaining cache coherence across
> the cluster.
> 
>  
> 
> What I have instead found, is that irrespective of whether
> RemoveUponRemotePut is set to true or false, the behavior
> is as follows:
> 
> 1.       Add element to Client1 .
> 
> 2.       Add element to Client2.
> 
> 3.       Update element in
> Client1.
> 
> Result - The element in Client2 also gets updated with the
> new value. -
> This is not desired, I'd like the element to be removed
> from Client2's
> cache at this point, instead of the element being
> replicated in
> client2's cache.
> 
>  
> 
> My configuration files (both server and client) are listed
> below. Could
> you please point out what I'm making a mistake with. I
> tried setting the
> value to true and to false and I still get the same
> behavior for both
> settings.
> 
>  
> 
> Thanks,
> 
> Avanti
> 
>  
> 
> My client CCF file looks as follows:
> 
> # DEFAULT CACHE REGION
> 
> jcs.default=RFailover
> 
> jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttribut
> es
> 
> jcs.default.cacheattributes.MaxObjects=100000
> 
> jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory
> .lru.LRUMemoryCache
> 
> jcs.default.cacheattributes.UseMemoryShrinker=false
> 
> jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> 
> jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
> 
> jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
> 
> jcs.default.elementattributes.IsEternal=false
> 
> jcs.default.elementattributes.MaxLifeSeconds=21600
> 
> jcs.default.elementattributes.IdleTime=1800
> 
> jcs.default.elementattributes.IsSpool=false
> 
> jcs.default.elementattributes.IsRemote=false
> 
> jcs.default.elementattributes.IsLateral=false
> 
>  
> 
> # PRE-DEFINED CACHE REGIONS
> 
> jcs.region.testCache1=RFailover
> 
> jcs.region.testCache1.cacheattributes=org.apache.jcs.engine.CompositeCac
> heAttributes
> 
> jcs.region.testCache1.cacheattributes.MaxObjects=100000
> 
> jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.jcs.eng
> ine.memory.lru.LRUMemoryCache
> 
> jcs.region.testCache1.cacheattributes.UseMemoryShrinker=false
> 
> jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> 
> jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
> 
> jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
> 
> jcs.region.testCache1.elementattributes=org.apache.jcs.engine.ElementAtt
> ributes
> 
> jcs.region.testCache1.elementattributes.IsEternal=false
> 
>  
> 
> # Remote RMI Cache set up to failover
> 
> jcs.auxiliary.RFailover=org.apache.jcs.auxiliary.remote.RemoteCacheFacto
> ry
> 
> jcs.auxiliary.RFailover.attributes=org.apache.jcs.auxiliary.remote.Remot
> eCacheAttributes
> 
> jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:1111
> 
> jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true
> 
> jcs.auxiliary.RFailover.attributes.GetOnly=false
> 
>  
> 
> The server's cache.ccf file looks as follows:
> 
> registry.host=localhost
> 
> registry.port=1111
> 
> remote.cache.service.port=1111
> 
> remote.cache.rmiSocketFactoryTimeoutMillis=5000
> 
> remote.cluster.LocalClusterConsistency=false
> 
> remote.cluster.AllowClusterGet=false
> 
> #
> 
> # DEFAULT CACHE REGION
> 
> jcs.default=
> 
> jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttribut
> es
> 
> jcs.default.cacheattributes.MaxObjects=1000
> 
> jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory
> .lru.LRUMemoryCache
> 
> jcs.default.cacheattributes.UseMemoryShrinker=false
> 
> jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> 
> jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
> 
> jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
> 
> jcs.default.elementattributes.IsEternal=false
> 
> jcs.default.elementattributes.MaxLifeSeconds=21600
> 
> jcs.default.elementattributes.IdleTime=1800
> 
> jcs.default.elementattributes.IsSpool=false
> 
> jcs.default.elementattributes.IsRemote=false
> 
> jcs.default.elementattributes.IsLateral=false
> 
> #
> 
> # PRE-DEFINED CACHE REGIONS
> 
> jcs.region.testCache1=
> 
> jcs.region.testCache1.cacheattributes=org.apache.jcs.engine.CompositeCac
> heAttributes
> 
> jcs.region.testCache1.cacheattributes.MaxObjects=1000
> 
> jcs.region.testCache1.cacheattributes.MemoryCacheName=org.apache.jcs.eng
> ine.memory.lru.LRUMemoryCache
> 
> jcs.region.testCache1.cacheattributes.UseMemoryShrinker=false
> 
> jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> 
> jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
> 
> jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
> 
> jcs.region.testCache1.elementattributes=org.apache.jcs.engine.ElementAtt
> ributes
> 
> jcs.region.testCache1.elementattributes.IsEternal=false
> 
> jcs.region.testCache1.elementattributes.IsSpool=false
> 
> jcs.region.testCache1.elementattributes.IsRemote=false
> 
> jcs.region.testCache1.elementattributes.IsLateral=false
> 
> jcs.region.testCache1.elementattributes.IdleTime=1800
> 
> jcs.region.testCache1.elementattributes.MaxLifeSeconds=21600
> 
>  
> 
> 

---------------------------------------------------------------------
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