jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt Varszegi" <zs...@switchfire.com>
Subject remote cache server configuration
Date Mon, 26 Mar 2007 15:15:49 GMT
Hi,
 
I would like to ask about my remote cache application that is displaying
a strange behaviour.
 
I have one non-clustered cache server - with a web user interface which
lists all regions and the keys of the elements in them and buttons to
remove all elements from a region, very similar to the JCSAdmin.jsp -
and a few clients. The clients share one particular cache region called
'central-permanent'. 
 
When one client puts an object into 'central-permanent' and then the
same or any other client clears the region then each client will see the
region being empty - that is no keys may be retrieved by them e.g. with
getGroupKeys. (I expected exactly this behaviour). 
 
However when I am trying to clear cache region 'central-permanent' from
the server code then it seems to be only partially successful. That is:
every client will see that the cache has no entries (no keys) EXCEPT for
the client which made the original put for those elements.
 
- Is this an expected behaviour?
 
- If yes, how is it possible to centrally clear regions on the server so
that every client will perceive the cache as really empty.
 
(I did not use JCSAdmin page because the JCSAdminBean.clearRegion() did
not do the job either and because I needed to reimplement getByteCount()
anyway since it did not return the correct size for cache elements that
were wrapped in CacheElementSerialized - I recently posted that issue on
the list.)
 
Server  cache.ccf:
 
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
registry.port=1102
remote.cache.service.port=1103
 
Client cache.ccf:
 
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.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLifeSeconds=3600
jcs.default.elementattributes.IsSpool=false
jcs.default.elementattributes.IsLateral=false
jcs.default.elementattributes.IsRemote=false
 
jcs.region.central-permanent=remote
jcs.region.central-permanent.cacheattributes=org.apache.jcs.engine.Compo
siteCacheAttributes
jcs.region.central-permanent.cacheattributes.MaxObjects=1000
jcs.region.central-permanent.cacheattributes.MemoryCacheName=org.apache.
jcs.engine.memory.lru.LRUMemoryCache
jcs.region.central-permanent.cacheattributes.UseMemoryShrinker=false
jcs.region.central-permanent.elementattributes=org.apache.jcs.engine.Ele
mentAttributes
jcs.region.central-permanent.elementattributes.IsEternal=true
jcs.region.central-permanent.elementattributes.MaxLifeSeconds=-1
jcs.region.central-permanent.elementattributes.IsSpool=false
jcs.region.central-permanent.elementattributes.IsLateral=false
jcs.region.central-permanent.elementattributes.IsRemote=true
 
jcs.auxiliary.remote=org.apache.jcs.auxiliary.remote.RemoteCacheFactory
jcs.auxiliary.remote.attributes=org.apache.jcs.auxiliary.remote.RemoteCa
cheAttributes
jcs.auxiliary.remote.attributes.FailoverServers=192.168.x.y:1102
jcs.auxiliary.remote.attributes.LocalPort=1106
jcs.auxiliary.remote.attributes.RemoveUponRemotePut=true
jcs.auxiliary.remote.attributes.RmiSocketFactoryTimeoutMillis=5000
jcs.auxiliary.remote.attributes.GetOnly=false
jcs.auxiliary.remote.attributes.Receive=true
 
Cache client making the put:
 
...
JCS cacheRegion =JCS.getInstance(region);
try {
 cacheRegion.putInGroup(key,"defaultGroup",objectToPut);
} catch (CacheException e) {
 throw new RuntimeException("message "+,e);
}
...
 
Cache client code (and server code as well) just calls
cacheRegion.clear() in a similar manner when the above described
behaviour appears.
 
Thanks in advance,
Zsolt

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message