From turbine-jcs-dev-returnsmithpamela@example.org Mon Aug 09 12:11:23 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 65079 invoked from network); 9 Aug 2004 12:11:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 9 Aug 2004 12:11:22 -0000 Received: (qmail 96473 invoked by uid 500); 9 Aug 2004 12:11:22 -0000 Delivered-To: smithpamela@example.org Received: (qmail 96435 invoked by uid 500); 9 Aug 2004 12:11:21 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 96421 invoked by uid 99); 9 Aug 2004 12:11:21 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO amsfep16-int.chello.nl) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 09 Aug 2004 05:11:18 -0700 Received: from nixis ([83.161.120.155]) by amsfep16-int.chello.nl (InterMail vM.83.161.120.155 201-2115-109-103-20031105) with ESMTP id <20040809121115.VHCB3867.amsfep16-int.chello.nl@nixis> for <smithpamela@example.org>; Mon, 9 Aug 2004 14:11:15 +0200 From: "David Vismans" <smithpamela@example.org> To: <smithpamela@example.org> Subject: Newbie: pulling my hair out with remote cache Date: Mon, 9 Aug 2004 14:13:13 +0200 Message-ID: <019b01c47e0a$3efb5d10$69fc8418@nixis> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi everyone, First, JCS looks great! Looking forward to some extensive usage. However, I have been trying to get the remote cache working for about a week now, and I am not succeeding. Here's the setup: C1 (client 1) pushes an element E in it's local cache. CS (server) receives (the update of) this object and does store it. C2 (client 2) is able to retrieve the cached element E from CS. so far so good, but when C1 repetitively updates E (named "test") with a random integer value, C2 is not notified of the new value for this key. CS DOES receive the element, but does not propagate to C2. I have read through every example and also mailinglist messages I still have not found the solution. I got JCS from the CVS and RMI is working, I created the stubs etc. I am using the latest jdk on windows xp home edition. Perhaps an interesting detail: I did not get the lateral cache to propagate either (there is no firewall running). All clients and the server run on the same machine. If anyone could help me out here I would really appreciate it! Thanks in advance, David Below are my configuration files: C1: # PRE-DEFINED CACHE REGIONS jcs.region.Tasks=DC,RFailover jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt ributes jcs.region.Tasks.cacheattributes.MaxObjects=1000 jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m emory.lru.LRUMemoryCache jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600 jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60 jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut es jcs.region.Tasks.elementattributes.IsEternal=false jcs.region.Tasks.elementattributes.IdleTime=1800 jcs.region.Tasks.elementattributes.IsSpool=true jcs.region.Tasks.elementattributes.IsRemote=true jcs.region.Tasks.elementattributes.IsLateral=false jcs.system.groupIdCache=jcs.system.groupIdCache.cacheattributes=org.apac he.jcs.engine.CompositeCacheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e ngine.memory.lru.LRUMemoryCache # 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.RemoteHost=localhost jcs.auxiliary.RFailover.attributes.RemotePort=2099 jcs.auxiliary.RFailover.attributes.LocalPort=2103 #jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:2099 jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true jcs.auxiliary.RFailover.attributes.GetOnly=false #jcs.auxiliary.RFailover.attributes.RemoteTypeName=REMOTE # AVAILABLE AUXILIARY CACHES jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF actory jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/diskcachelocal jcs.auxiliary.DC.attributes.maxKeySize=1000 ------------------ C2: # PRE-DEFINED CACHE REGIONS jcs.region.Tasks=DC,RFailover jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt ributes jcs.region.Tasks.cacheattributes.MaxObjects=1000 jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m emory.lru.LRUMemoryCache jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600 jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60 jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut es jcs.region.Tasks.elementattributes.IsEternal=false jcs.region.Tasks.elementattributes.IdleTime=1800 jcs.region.Tasks.elementattributes.IsSpool=true jcs.region.Tasks.elementattributes.IsRemote=true jcs.region.Tasks.elementattributes.IsLateral=false jcs.system.groupIdCache=jcs.system.groupIdCache.cacheattributes=org.apac he.jcs.engine.CompositeCacheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e ngine.memory.lru.LRUMemoryCache # 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.RemoteHost=localhost jcs.auxiliary.RFailover.attributes.RemotePort=2099 jcs.auxiliary.RFailover.attributes.LocalPort=2102 #jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:2099 jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true #jcs.auxiliary.RFailover.attributes.RemoteTypeName=REMOTE jcs.auxiliary.RFailover.attributes.GetOnly=false #jcs.auxiliary.RFailover.attributes.GetOnly=false #jcs.auxiliary.RFailover.attributes.RemoteServiceName=RemoteCache # AVAILABLE AUXILIARY CACHES jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF actory jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/updateclient1 jcs.auxiliary.DC.attributes.maxKeySize=1000 -------------- CS: registry.host=localhost registry.port=2099 remote.cache.service.port=2099 remote.tomcat.on=false remote.cluster.LocalClusterConsistency=true jcs.system.groupIdCache=DC jcs.system.groupIdCache.cacheattributes=org.apache.jcs.engine.CompositeC acheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e ngine.memory.lru.LRUMemoryCache jcs.system.groupIdCache.elementattributes=org.apache.jcs.engine.ElementA ttributes jcs.system.groupIdCache.elementattributes.IsEternal=true jcs.system.groupIdCache.elementattributes.MaxLifeSeconds=3600 jcs.system.groupIdCache.elementattributes.IdleTime=1800 jcs.system.groupIdCache.elementattributes.IsSpool=true jcs.system.groupIdCache.elementattributes.IsRemote=false jcs.system.groupIdCache.elementattributes.IsLateral=false # DEFAULT CACHE REGION jcs.default=DC jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttribut es jcs.default.cacheattributes.MaxObjects=10000 jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory .lru.LRUMemoryCache jcs.default.elementattributes.IsEternal=false jcs.default.elementattributes.MaxLifeSeconds=3600 jcs.default.elementattributes.IdleTime=1800 jcs.default.elementattributes.IsSpool=true jcs.default.elementattributes.IsRemote=true jcs.default.elementattributes.IsLateral=false # PRE-DEFINED CACHE REGIONS jcs.region.Tasks=DC jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt ributes jcs.region.Tasks.cacheattributes.MaxObjects=1000 jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m emory.lru.LRUMemoryCache jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600 jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60 jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut es jcs.region.Tasks.elementattributes.IsEternal=true jcs.region.Tasks.elementattributes.IdleTime=1800 jcs.region.Tasks.elementattributes.IsSpool=true jcs.region.Tasks.elementattributes.IsRemote=true jcs.region.Tasks.elementattributes.IsLateral=false # AVAILABLE AUXILIARY CACHES jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF actory jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/diskcacheremote/ jcs.auxiliary.DC.attributes.maxKeySize=100000 jcs.auxiliary.DC.elementattributes=org.apache.jcs.engine.ElementAttribut es jcs.auxiliary.DC.elementattributes.IsEternal=true jcs.auxiliary.DC.elementattributes.IdleTime=1800 jcs.auxiliary.DC.elementattributes.IsSpool=true jcs.auxiliary.DC.elementattributes.IsRemote=true jcs.auxiliary.DC.elementattributes.IsLateral=false --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org From turbine-jcs-dev-returnsmithpamela@example.org Mon Aug 09 15:55:18 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 30873 invoked from network); 9 Aug 2004 15:55:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 9 Aug 2004 15:55:18 -0000 Received: (qmail 85559 invoked by uid 500); 9 Aug 2004 15:55:17 -0000 Delivered-To: smithpamela@example.org Received: (qmail 85527 invoked by uid 500); 9 Aug 2004 15:55:17 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 85511 invoked by uid 99); 9 Aug 2004 15:55:16 -0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=DNS_FROM_RFC_POST,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO smtp-out-2001.amazon.com) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 09 Aug 2004 08:55:14 -0700 Received: from smtp-in-2002.iad2.amazon.com by smtp-out-2001.amazon.com with ESMTP (peer crosscheck: smtp-in-2002.iad2.amazon.com) X-Amazon-Corporate-Relay: smtp-out-2001.iad2.amazon.com X-AMAZON-TRACK: <smithpamela@example.org> Received: from ex-mail-sea-03.ant.amazon.com by smtp-in-2002.iad2.amazon.com with ESMTP (crosscheck: ex-mail-sea-03.ant.amazon.com [83.161.120.155]) id i79Ft6Lp025386 for <smithpamela@example.org>; Mon, 9 Aug 2004 15:55:11 GMT x-mimeole: Produced By Microsoft Exchange V6.0.6556.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Newbie: pulling my hair out with remote cache Date: Mon, 9 Aug 2004 08:54:09 -0700 Message-ID: <smithpamela@example.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Newbie: pulling my hair out with remote cache Thread-Index: AcR+Cf8NrnSR4bLRToe7XbcwHLOENwAHqvQg From: "Smuts, Aaron" <smithpamela@example.org> To: "Turbine JCS Developers List" <smithpamela@example.org> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N You have the remote server configured to invalidate items on other local = caches when something is put into the originating local cache. When an = item is put in C1 it tells CS, CS then tells all other registered = caches, in this case C2, to remove the item. The setting is in this = line. If you don't want this behavior, then set this to false. jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=3Dtrue Having this set to true is recommended for situations where the data on = a particular machine may be somewhat user specific. There are some = case, like this, where you don't want the items stored in memory to be = the same on all machines. =20 Cheers, Aaron -----Original Message----- From: David Vismans [mailto:smithpamela@example.org]=20 Sent: Monday, August 09, 2004 5:13 AM To: smithpamela@example.org Subject: Newbie: pulling my hair out with remote cache Hi everyone, First, JCS looks great! Looking forward to some extensive usage. However, I have been trying to get the remote cache working for about a = week now, and I am not succeeding. Here's the setup: C1 (client 1) pushes an element E in it's local cache. CS (server) receives (the update of) this object and does store it. C2 (client 2) is able to retrieve the cached element E from CS. so far so good, but when C1 repetitively updates E (named "test") with a random integer = value, C2 is not notified of the new value for this key. CS DOES receive the = element, but does not propagate to C2. I have read through every example and also mailinglist messages I still = have not found the solution. I got JCS from the CVS and RMI is working, I created the stubs etc. I am using the latest jdk on windows xp home edition. Perhaps an interesting detail: I did not get the lateral cache to = propagate either (there is no firewall running). All clients and the = server run on the same machine. If anyone could help me out here I would really appreciate it! Thanks in advance, David Below are my configuration files: C1: # PRE-DEFINED CACHE REGIONS =20 jcs.region.Tasks=3DDC,RFailover jcs.region.Tasks.cacheattributes=3Dorg.apache.jcs.engine.CompositeCacheAt= t ributes jcs.region.Tasks.cacheattributes.MaxObjects=3D1000 jcs.region.Tasks.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.engine.= m emory.lru.LRUMemoryCache jcs.region.Tasks.cacheattributes.UseMemoryShrinker=3Dfalse jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3D3600 jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=3D60 jcs.region.Tasks.elementattributes=3Dorg.apache.jcs.engine.ElementAttribu= t es jcs.region.Tasks.elementattributes.IsEternal=3Dfalse jcs.region.Tasks.elementattributes.IdleTime=3D1800 jcs.region.Tasks.elementattributes.IsSpool=3Dtrue jcs.region.Tasks.elementattributes.IsRemote=3Dtrue jcs.region.Tasks.elementattributes.IsLateral=3Dfalse jcs.system.groupIdCache=3Djcs.system.groupIdCache.cacheattributes=3Dorg.a= pac he.jcs.engine.CompositeCacheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=3D10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.= e ngine.memory.lru.LRUMemoryCache # Remote RMI Cache set up to failover jcs.auxiliary.RFailover=3Dorg.apache.jcs.auxiliary.remote.RemoteCacheFact= o ry jcs.auxiliary.RFailover.attributes=3Dorg.apache.jcs.auxiliary.remote.Remo= t eCacheAttributes jcs.auxiliary.RFailover.attributes.RemoteHost=3Dlocalhost jcs.auxiliary.RFailover.attributes.RemotePort=3D2099 jcs.auxiliary.RFailover.attributes.LocalPort=3D2103 #jcs.auxiliary.RFailover.attributes.FailoverServers=3Dlocalhost:2099 jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=3Dtrue jcs.auxiliary.RFailover.attributes.GetOnly=3Dfalse #jcs.auxiliary.RFailover.attributes.RemoteTypeName=3DREMOTE # AVAILABLE AUXILIARY CACHES =20 jcs.auxiliary.DC=3Dorg.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache= F actory jcs.auxiliary.DC.attributes=3Dorg.apache.jcs.auxiliary.disk.indexed.Index= e dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=3DC:/Temp/diskcachelocal jcs.auxiliary.DC.attributes.maxKeySize=3D1000 ------------------ C2: # PRE-DEFINED CACHE REGIONS =20 jcs.region.Tasks=3DDC,RFailover jcs.region.Tasks.cacheattributes=3Dorg.apache.jcs.engine.CompositeCacheAt= t ributes jcs.region.Tasks.cacheattributes.MaxObjects=3D1000 jcs.region.Tasks.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.engine.= m emory.lru.LRUMemoryCache jcs.region.Tasks.cacheattributes.UseMemoryShrinker=3Dfalse jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3D3600 jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=3D60 jcs.region.Tasks.elementattributes=3Dorg.apache.jcs.engine.ElementAttribu= t es jcs.region.Tasks.elementattributes.IsEternal=3Dfalse jcs.region.Tasks.elementattributes.IdleTime=3D1800 jcs.region.Tasks.elementattributes.IsSpool=3Dtrue jcs.region.Tasks.elementattributes.IsRemote=3Dtrue jcs.region.Tasks.elementattributes.IsLateral=3Dfalse jcs.system.groupIdCache=3Djcs.system.groupIdCache.cacheattributes=3Dorg.a= pac he.jcs.engine.CompositeCacheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=3D10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.= e ngine.memory.lru.LRUMemoryCache # Remote RMI Cache set up to failover jcs.auxiliary.RFailover=3Dorg.apache.jcs.auxiliary.remote.RemoteCacheFact= o ry jcs.auxiliary.RFailover.attributes=3Dorg.apache.jcs.auxiliary.remote.Remo= t eCacheAttributes jcs.auxiliary.RFailover.attributes.RemoteHost=3Dlocalhost jcs.auxiliary.RFailover.attributes.RemotePort=3D2099 jcs.auxiliary.RFailover.attributes.LocalPort=3D2102 #jcs.auxiliary.RFailover.attributes.FailoverServers=3Dlocalhost:2099 jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=3Dtrue #jcs.auxiliary.RFailover.attributes.RemoteTypeName=3DREMOTE jcs.auxiliary.RFailover.attributes.GetOnly=3Dfalse #jcs.auxiliary.RFailover.attributes.GetOnly=3Dfalse #jcs.auxiliary.RFailover.attributes.RemoteServiceName=3DRemoteCache # AVAILABLE AUXILIARY CACHES =20 jcs.auxiliary.DC=3Dorg.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache= F actory jcs.auxiliary.DC.attributes=3Dorg.apache.jcs.auxiliary.disk.indexed.Index= e dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=3DC:/Temp/updateclient1 jcs.auxiliary.DC.attributes.maxKeySize=3D1000 -------------- CS: registry.host=3Dlocalhost registry.port=3D2099 remote.cache.service.port=3D2099 remote.tomcat.on=3Dfalse remote.cluster.LocalClusterConsistency=3Dtrue jcs.system.groupIdCache=3DDC jcs.system.groupIdCache.cacheattributes=3Dorg.apache.jcs.engine.Composite= C acheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=3D10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.= e ngine.memory.lru.LRUMemoryCache jcs.system.groupIdCache.elementattributes=3Dorg.apache.jcs.engine.Element= A ttributes jcs.system.groupIdCache.elementattributes.IsEternal=3Dtrue jcs.system.groupIdCache.elementattributes.MaxLifeSeconds=3D3600 jcs.system.groupIdCache.elementattributes.IdleTime=3D1800 jcs.system.groupIdCache.elementattributes.IsSpool=3Dtrue jcs.system.groupIdCache.elementattributes.IsRemote=3Dfalse jcs.system.groupIdCache.elementattributes.IsLateral=3Dfalse # DEFAULT CACHE REGION =20 jcs.default=3DDC jcs.default.cacheattributes=3Dorg.apache.jcs.engine.CompositeCacheAttribu= t es jcs.default.cacheattributes.MaxObjects=3D10000 jcs.default.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.engine.memor= y .lru.LRUMemoryCache jcs.default.elementattributes.IsEternal=3Dfalse jcs.default.elementattributes.MaxLifeSeconds=3D3600 jcs.default.elementattributes.IdleTime=3D1800 jcs.default.elementattributes.IsSpool=3Dtrue jcs.default.elementattributes.IsRemote=3Dtrue jcs.default.elementattributes.IsLateral=3Dfalse # PRE-DEFINED CACHE REGIONS =20 jcs.region.Tasks=3DDC jcs.region.Tasks.cacheattributes=3Dorg.apache.jcs.engine.CompositeCacheAt= t ributes jcs.region.Tasks.cacheattributes.MaxObjects=3D1000 jcs.region.Tasks.cacheattributes.MemoryCacheName=3Dorg.apache.jcs.engine.= m emory.lru.LRUMemoryCache jcs.region.Tasks.cacheattributes.UseMemoryShrinker=3Dfalse jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3D3600 jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=3D60 jcs.region.Tasks.elementattributes=3Dorg.apache.jcs.engine.ElementAttribu= t es jcs.region.Tasks.elementattributes.IsEternal=3Dtrue jcs.region.Tasks.elementattributes.IdleTime=3D1800 jcs.region.Tasks.elementattributes.IsSpool=3Dtrue jcs.region.Tasks.elementattributes.IsRemote=3Dtrue jcs.region.Tasks.elementattributes.IsLateral=3Dfalse # AVAILABLE AUXILIARY CACHES =20 jcs.auxiliary.DC=3Dorg.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache= F actory jcs.auxiliary.DC.attributes=3Dorg.apache.jcs.auxiliary.disk.indexed.Index= e dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=3DC:/Temp/diskcacheremote/ jcs.auxiliary.DC.attributes.maxKeySize=3D100000 jcs.auxiliary.DC.elementattributes=3Dorg.apache.jcs.engine.ElementAttribu= t es jcs.auxiliary.DC.elementattributes.IsEternal=3Dtrue jcs.auxiliary.DC.elementattributes.IdleTime=3D1800 jcs.auxiliary.DC.elementattributes.IsSpool=3Dtrue jcs.auxiliary.DC.elementattributes.IsRemote=3Dtrue jcs.auxiliary.DC.elementattributes.IsLateral=3Dfalse --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org From turbine-jcs-dev-returnsmithpamela@example.org Mon Aug 09 17:01:39 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 70768 invoked from network); 9 Aug 2004 17:01:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 9 Aug 2004 17:01:39 -0000 Received: (qmail 1884 invoked by uid 500); 9 Aug 2004 17:01:38 -0000 Delivered-To: smithpamela@example.org Received: (qmail 1838 invoked by uid 500); 9 Aug 2004 17:01:38 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 1823 invoked by uid 99); 9 Aug 2004 17:01:37 -0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 09 Aug 2004 10:01:36 -0700 Date: Mon, 9 Aug 2004 10:01:35 -0700 (PDT) From: "Adam R. B. Jack" <smithpamela@example.org> To: Turbine JCS Developers List <smithpamela@example.org> Subject: Cocoon and JCS (on Gump) Message-ID: <smithpamela@example.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Dear JCS folks, Could somebody look into this please, and provide the Cocoon community with some guidance? Is this a permenant change? Is this something that will cause a disconnect in the field (in environments where old jars mix with new?) regards Adam ----- Original Message ----- From: "Adam R. B. Jack" <smithpamela@example.org> To: "Turbine JCS Developers List" <smithpamela@example.org> Sent: Thursday, July 29, 2004 8:19 PM Subject: Fw: [GUMP][PATCH] cocoon seems to require log4j > Can you folks look at this, for the Cocoon community? Did this change (it > appears so) and if so, did it need to? What can we do to smooth a transition > in the field (in environments running on different releases). > > regards > > Adam > > Although it seems there may still be something to fix: > > > > > http://brutus.apache.org/gump/public/cocoon-2.1/cocoon/gump_work/build_cocoon-2.1_cocoon.html > > > > > http://brutus.apache.org/gump/public/cocoon-2.1/cocoon/gump_work/build_cocoon-2.1_cocoon.txt > > > > [javac] > > > /usr/local/gump/public/workspace/cocoon-2.1/src/java/org/apache/cocoon/compo > > nents/store/impl/JCSDefaultStore.java:361: dispose() in > > org.apache.cocoon.components.store.impl.JCSDefaultStore.JCSCacheAccess > > cannot override dispose() in org.apache.jcs.access.CacheAccess; attempting > > to assign weaker access privileges; was public > > [javac] protected void dispose() { > > [javac] ^ > > [javac] 1 error > -- Have you Gump'ed your code today? http://gump.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org From turbine-jcs-dev-returnsmithpamela@example.org Mon Aug 09 17:26:53 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 84764 invoked from network); 9 Aug 2004 17:26:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 9 Aug 2004 17:26:52 -0000 Received: (qmail 52361 invoked by uid 500); 9 Aug 2004 17:26:50 -0000 Delivered-To: smithpamela@example.org Received: (qmail 52252 invoked by uid 500); 9 Aug 2004 17:26:48 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 52168 invoked by uid 99); 9 Aug 2004 17:26:47 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO exchange.ifilm) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 09 Aug 2004 10:26:43 -0700 Received: by exchange.ifilm.com with Internet Mail Service (5.5.2653.19) id <P7ZPGW1F>; Mon, 9 Aug 2004 10:25:34 -0700 Message-ID: <smithpamela@example.org> From: Travis Savo <smithpamela@example.org> To: 'Turbine JCS Developers List' <smithpamela@example.org> Subject: RE: CachingWorker Date: Mon, 9 Aug 2004 10:25:33 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I'm nearing completion of this refactoring. I changed the JCSWorker to take the region only in the constructor, and do the JCS.getInstance() there. No more calling JCS.getInstance() every time! JCSWorker.getResult() takes a Serializable Key, and a JCSWorkerHelper, which is an interface consisting of: public Object doWork() throws Exception. So the typical usage looks like: public class someClass{ private static final JCSWorker worker = new JCSWorker("someRegion"); public Object getSomething(Serializable aKey){ JCSWorkerHelper helper = new AbstractJCSWorkerHelper(){ public Object doWork(){ return /* Do some work here on the cache miss */; } } Object result = worker.getResult(aKey, helper); } } AbstractJCSWorkerHelper is a basic implementation of JCSWorkerHelper for convince. There's also methods with signatures for groups too. The semantics of mutual exclusion still apply: If one person starts doing the work, all subsequent identical requests will wait for the first one to finish and then do cache gets, so there's no race condition where the work gets done and put multiple times unnecessarily. As an aside, it's trivial to extend this to perform additional operations on objects coming out of cache. I'll post one for Hibernate which locks the objects with a Hibernate Session. I'll commit this to experimental later on once I've updated the Javadocs to reflect the new interface. -Travis Savo <smithpamela@example.org> -----Original Message----- From: Aaron Smuts [mailto:smithpamela@example.org] Sent: Saturday, July 17, 2004 11:37 AM To: 'Turbine JCS Developers List' Subject: RE: CachingWorker This is interesting. I don't like getting the region everytime you do a get. This slows things down dramatically. I posted on the javaworld article on caching about this. Their timings were way off because of it. We might be able to make it more efficient. I'd prefer issuing a get on a region I have has a static variable, and then calling something like this if it returns null. Would that work? I see how it could be useful. You can always put anything in the experiemental package or, maybe better, something like this in a subpackage of utils on the main src. org.apache.jcs.utils.access or worker or something that makes sense, say org.apache.control.loader . We should also look into the idea of implementing pluggable cacheLoaders for a region. Have you looked at the FutureResult in Doug Lea's util concurrent package. It may be useful here. I'm still looking over your idea. On another issue, we need to make items in groups returnable by jus the key, without referencing the group. Otherwise a group is just an inefficient region. To do this we need to create a CacheKey object for the CacheElement. The CacheKey and the GroupAttrName classes need equals methods that can match on the same key. Cheers, Aaron > -----Original Message----- > From: Travis Savo [mailto:smithpamela@example.org] > Sent: Friday, July 16, 2004 7:04 PM > To: 'Turbine JCS Developers List' > Subject: CachingWorker > > Did you want my CachingWorker? > > It's a wrapper around JCS to encapsulate the most common set of actions > performed with JCS. > > Given a region and a key, do the following psudo-code: > > if(region.get(key) != null) > return region.get(key) > otherwise > doTheWork() > region.put(result) > return result > > It also ensures that if a CachingWorker is in the middle of doing the work > for the same region and key, the second (or Nth) CachingWorker will wait > and > use the results from that instead of doing the get/work/put again. > > Using JCS to do this might look like: > > final String key = "some:key"; > MyObject myObject = null; > JCS myRegion = JCS.getInstance("myRegion"); > if((myObject = (MyObject) myRegion.get(key)) == null){ > myObject = makeSomeObject(key); > myRegion.put(key, myObject); > } > > With the caching worker it's: > > final String key = "some:key"; > CachingWorker worker = new CachingWorker("myRegion", key) { > public Object doWork() throws Exception { > return makeSomeObject(key); > } > }; > MyObject myObject = (MyObject) worker.getResult(); > > The advantage is with the CachingWorker, if two (or more) threads execute > this code in parallel, only one will do the work, while the second > CachingWorker waits, and mooches off the result of the first. > > I stuck it in the org.apache.jcs package in my project because it's just > an > advanced interface for org.apache.jcs.JCS and has no dependencies on > anything but org.apache.jcs.JCS and commons.logging. > > Here's the code. It's well javadoced. Of course I'd be happy to commit it > myself if you want. > > /* > * Created on Oct 8, 2003 > * > */ > package org.apache.jcs; > import java.io.Serializable; > import java.util.HashMap; > import java.util.Map; > import org.apache.commons.logging.Log; > import org.apache.commons.logging.LogFactory; > /** > * Utility class to encapsulate doing a piece of work, and caching the > results > * in JCS. Simply implement this class and override protected Object > doWork(), > * and do the work in there, returning the object to be cached. Then call > * .getResult() to get the result of the work. If the object isn't > allready > in > * the Cache, doWork() will get called, and the result will be put into > the > * cache. If the object is allready in cache, the cached result will be > returned > * instead. As an added bonus, multiple CachingWorkers with the same > region, > * group, and key won't do the work multiple times: The first > CachingWorker > to > * get started will do the work, and all subsequent workers with the same > * region, group, and key will wait on the first one and use his resulting > work > * instead of doing the work themselves. > * > * This is ideal when the work being done is a query to the database where > the > * results may take time to be retrieved. > * > * For example: <br> > * > * <code> > * CachingWorker cachingWorker = new CachingWorker("example region", > aKey) {<br> > * public Object doWork() throws Exception { <br> > * // Do some (DB?) work here which results in a list <br> > * // This only happens if the cache dosn't have a item in this > region for aKey <br> > * // Note this is especially useful with Hibernate, which will > cache indiviual <br> > * // Objects, but not entire query result sets. <br> > * List results = query.list(); <br> > * // Whatever we return here get's cached with aKey, and future > calls to <br> > * // getResult() on a CachedWorker with the same region and key > will return that instead. <br> > * return results; <br> > * } <br> > * }; <br> > * List results = (List) cachingWorker.getResult();<br> > * </code> > * > * This is essentially the same as doing: JCS jcs = > JCS.getInstance("example > * region"); List results = (List) jcs.get(aKey); if(results != null){ > //do > the > * work here results = query.list(); jcs.put(aKey, results); } > * > * > * But has the added benifit of the work-load sharing; under normal > * circumstances if multiple threads all tried to do the same query at the > same > * time, the same query would happen multiple times on the database, and > the > * resulting object would get put into JCS multiple times. > * > * Using the Caching worker eliminates this senario entirely. > * > * @author Travis Savo > */ > public abstract class CachingWorker { > private static final Log logger = > LogFactory.getLog(CachingWorker.class); > /** > * Object to hold the result of the work. > */ > private Object result = null; > public boolean wasCached = false; > /** > * Map to hold who's doing work presently. > */ > private static volatile Map map = new HashMap(); > /** > * Boolean to let us know if we need to wait or if it's finished. > */ > private volatile boolean finished = false; > /** > * Region for the JCS cache. > */ > private String region; > /** > * Key for caching the results with. > */ > private Serializable key; > /** > * Optional Group to store the result under. > */ > private String group = null; > /** > * Constructor which takes a region and a key, but no group. > * > * @param aName > * The Region to use for the JCS cache. > * @param aKey > * The key to store the result under. > */ > public CachingWorker(String aRegion, Serializable aKey) { > this(aRegion, aKey, null); > } > /** > * Constructor which takes a region, a key, and a group. > * > * @param aName > * The Region to use for the JCS cache. > * @param aKey > * The key to store the result under. > * @param aGroup > * The group to store the result under. > */ > public CachingWorker(String aRegion, Serializable aKey, String > aGroup) { > region = aRegion; > key = aKey; > group = aGroup; > finished = false; > } > /** > * Abstract method to implement for the case where the object has > not been > * cached yet, and we need to get it from somewhere else and stick > the result > * in the cache. > * > * You should not be calling this yourself! Call getResult() > instead. > * > * @return The result of doing the work to be cached and returned in > * getResult() > * @throws Exception > * If something goes wrong, throw an Exception and nothing > will get > * cached. > */ > protected abstract Object doWork() throws Exception; > /** > * Getter for the region of the JCS Cache. > * > * @return The JCS region in which the result will be cached. > */ > public String getRegion() { > return region; > } > /** > * Getter for the key used to store the result of doing the work in > JCS. > * > * @return The key used to cache the result of the work. > */ > public Serializable getKey() { > return key; > } > /** > * Getter for the group used to store the result of doing the work > in JCS. > * > * @return The key group used to cache the result of the work (could > be null). > */ > public String getGroup() { > return group; > } > /** > * Gets the cached result for this region/key OR does the work and > caches the > * result, returning the result. If the result has not been cached > yet, this > * calls doWork() to do the work and cache the result. > * > * This is also an opertunity to do any post processing of the > result in your > * CachedWorker implementation. > * > * @return The result of doing the work, or the cached result. > * @throws Exception > * Throws an exception if anything goes wrong while doing > the work. > */ > public Object getResult() throws Exception { > return run(); > } > /** > * Try and get the object from the cache, and if it's not there, do > the work > * and cache it. This also ensures that only one CachedWorker is > doing the > * work and subsequent calls to a CachedWorker with identical > region/key/group > * will wait on the results of this call. > * > * @return Either the result of doing the work, or the cached > result. > * @throws Exception > * If something goes wrong while doing the work, throw an > exception. > */ > private Object run() throws Exception { > long start = 0; > long dbTime = 0; > CachingWorker thread = null; > synchronized (map) { > //Check to see if we allready have a thread doing > this work. > thread = (CachingWorker) map.get(getRegion() + > getKey()); > if (thread == null) { > //If not, add ourselves as the Worker so > //calls in another thread will use this > worker's result > map.put(getRegion() + getKey(), this); > } > } > if (thread != null) { > synchronized (thread) { > if (logger.isDebugEnabled()) { > logger.debug("Found a worker > allready doing this work (" + thread.getRegion() + ":" + thread.getKey() + > ")."); > } > if (!thread.finished) { > thread.wait(); > } > if (logger.isDebugEnabled()) { > logger.debug("Another thread > finished our work for us. Using thoes results instead. (" + > thread.getRegion() + ":" + thread.getKey() + ")."); > } > //Get the result and return it. > result = thread.result; > wasCached = thread.wasCached; > return result; > } > } > //Do the work > try { > if (logger.isDebugEnabled()) { > logger.debug(getRegion() + " is doing the > work."); > } > result = null; > //Get the cache > JCS cache = JCS.getInstance(getRegion()); > //Try to get the item from the cache > if (group != null) { > result = cache.getFromGroup(getKey(), > group); > } else { > result = cache.get(getKey()); > } > //If the cache dosn't have it, do the work. > wasCached = true; > if (result == null) { > wasCached = false; > result = doWork(); > if (logger.isDebugEnabled()) { > logger.debug("Work Done, caching: > key:" + getKey() + ", group:" + getGroup() + ", result:" + result + "."); > } > //Stick the result of the work in the cache. > if (group != null) { > cache.putInGroup(getKey(), group, > result); > } else { > cache.put(getKey(), result); > } > } > //return the result > return result; > } finally { > if (logger.isDebugEnabled()) { > logger.debug(getRegion() + ":" + getKey() + > " entered finally."); > } > synchronized (map) { > //Remove ourselves as the worker. > map.remove(getRegion() + getKey()); > synchronized (this) { > finished = true; > //Wake everyone waiting on us > notifyAll(); > } > } > } > } > } > > --------------------------------------------------------------------- > To unsubscribe, e-mail: smithpamela@example.org > For additional commands, e-mail: smithpamela@example.org --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org From turbine-jcs-dev-returnsmithpamela@example.org Mon Aug 09 19:18:42 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 43423 invoked from network); 9 Aug 2004 19:18:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 9 Aug 2004 19:18:41 -0000 Received: (qmail 56886 invoked by uid 500); 9 Aug 2004 19:18:41 -0000 Delivered-To: smithpamela@example.org Received: (qmail 56817 invoked by uid 500); 9 Aug 2004 19:18:40 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 56804 invoked by uid 99); 9 Aug 2004 19:18:40 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO exchange.ifilm) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 09 Aug 2004 12:18:37 -0700 Received: by exchange.ifilm.com with Internet Mail Service (5.5.2653.19) id <P7ZPG6TA>; Mon, 9 Aug 2004 12:18:43 -0700 Message-ID: <smithpamela@example.org> From: Travis Savo <smithpamela@example.org> To: 'Turbine JCS Developers List' <smithpamela@example.org> Subject: JCSWorker commit to CVS (was RE: CachingWorker) Date: Mon, 9 Aug 2004 12:18:42 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N It's been committed to CVS under the experimental package in org.apache.jcs.utils.access Comments and critique are ALWAYS welcome. We'll be testing this and deploying it in our production environment shortly (with the new PooledCacheEventQueue), so I'll let you know how that goes. I'm not married to the names of these classes, so if someone has some better names for it I'd love to hear them! -Travis Savo <smithpamela@example.org> -----Original Message----- From: Travis Savo [mailto:smithpamela@example.org] Sent: Monday, August 09, 2004 10:26 AM To: 'Turbine JCS Developers List' Subject: RE: CachingWorker I'm nearing completion of this refactoring. I changed the JCSWorker to take the region only in the constructor, and do the JCS.getInstance() there. No more calling JCS.getInstance() every time! JCSWorker.getResult() takes a Serializable Key, and a JCSWorkerHelper, which is an interface consisting of: public Object doWork() throws Exception. So the typical usage looks like: public class someClass{ private static final JCSWorker worker = new JCSWorker("someRegion"); public Object getSomething(Serializable aKey){ JCSWorkerHelper helper = new AbstractJCSWorkerHelper(){ public Object doWork(){ return /* Do some work here on the cache miss */; } } Object result = worker.getResult(aKey, helper); } } AbstractJCSWorkerHelper is a basic implementation of JCSWorkerHelper for convince. There's also methods with signatures for groups too. The semantics of mutual exclusion still apply: If one person starts doing the work, all subsequent identical requests will wait for the first one to finish and then do cache gets, so there's no race condition where the work gets done and put multiple times unnecessarily. As an aside, it's trivial to extend this to perform additional operations on objects coming out of cache. I'll post one for Hibernate which locks the objects with a Hibernate Session. I'll commit this to experimental later on once I've updated the Javadocs to reflect the new interface. -Travis Savo <smithpamela@example.org> --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org From turbine-jcs-dev-returnsmithpamela@example.org Mon Aug 09 20:23:34 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 80700 invoked from network); 9 Aug 2004 20:23:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 9 Aug 2004 20:23:33 -0000 Received: (qmail 46929 invoked by uid 500); 9 Aug 2004 20:23:33 -0000 Delivered-To: smithpamela@example.org Received: (qmail 46896 invoked by uid 500); 9 Aug 2004 20:23:32 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 46882 invoked by uid 99); 9 Aug 2004 20:23:32 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO exchange.ifilm) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 09 Aug 2004 13:23:29 -0700 Received: by exchange.ifilm.com with Internet Mail Service (5.5.2653.19) id <P7ZPG9PT>; Mon, 9 Aug 2004 13:22:16 -0700 Message-ID: <smithpamela@example.org> From: Travis Savo <smithpamela@example.org> To: 'Turbine JCS Developers List' <smithpamela@example.org> Cc: "'smithpamela@example.org'" <smithpamela@example.org> Subject: RE: Cocoon and JCS (on Gump) Date: Mon, 9 Aug 2004 13:22:14 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N According to the change log Aaron Smuts made this change on 6/28/2004 in order to make .dispose() visible to the clients of the JCS class. I expect it will be a permanent change because it's reasonable that clients of the JCS class will want to dispose of a region themselves. The only problems I foresee with upgrading this in the field is if there's a class that extends CacheAccess (which you appear to be doing). In this case you will need to upgrade your code, but I expect this to be an isolated and rare occurrence. Assuming that's not the case, I see no problems mixing jars in the field in relationship to this change. Does that answer your question? -Travis Savo <smithpamela@example.org> -----Original Message----- From: Adam R. B. Jack [mailto:smithpamela@example.org] Sent: Monday, August 09, 2004 10:02 AM To: Turbine JCS Developers List Subject: Cocoon and JCS (on Gump) Dear JCS folks, Could somebody look into this please, and provide the Cocoon community with some guidance? Is this a permenant change? Is this something that will cause a disconnect in the field (in environments where old jars mix with new?) regards Adam ----- Original Message ----- From: "Adam R. B. Jack" <smithpamela@example.org> To: "Turbine JCS Developers List" <smithpamela@example.org> Sent: Thursday, July 29, 2004 8:19 PM Subject: Fw: [GUMP][PATCH] cocoon seems to require log4j > Can you folks look at this, for the Cocoon community? Did this change (it > appears so) and if so, did it need to? What can we do to smooth a transition > in the field (in environments running on different releases). > > regards > > Adam > > Although it seems there may still be something to fix: > > > > > http://brutus.apache.org/gump/public/cocoon-2.1/cocoon/gump_work/build_cocoo n-2.1_cocoon.html > > > > > http://brutus.apache.org/gump/public/cocoon-2.1/cocoon/gump_work/build_cocoo n-2.1_cocoon.txt > > > > [javac] > > > /usr/local/gump/public/workspace/cocoon-2.1/src/java/org/apache/cocoon/compo > > nents/store/impl/JCSDefaultStore.java:361: dispose() in > > org.apache.cocoon.components.store.impl.JCSDefaultStore.JCSCacheAccess > > cannot override dispose() in org.apache.jcs.access.CacheAccess; attempting > > to assign weaker access privileges; was public > > [javac] protected void dispose() { > > [javac] ^ > > [javac] 1 error > -- Have you Gump'ed your code today? http://gump.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org From turbine-jcs-dev-returnsmithpamela@example.org Mon Aug 09 20:52:13 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 96603 invoked from network); 9 Aug 2004 20:52:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 9 Aug 2004 20:52:13 -0000 Received: (qmail 78206 invoked by uid 500); 9 Aug 2004 20:52:12 -0000 Delivered-To: smithpamela@example.org Received: (qmail 78177 invoked by uid 500); 9 Aug 2004 20:52:12 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 78159 invoked by uid 99); 9 Aug 2004 20:52:12 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO exchange.ifilm) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 09 Aug 2004 13:52:08 -0700 Message-ID: <smithpamela@example.org> From: Travis Savo <smithpamela@example.org> To: 'Turbine JCS Developers List' <smithpamela@example.org> Subject: JCSWorker extension for Hibernate Date: Mon, 9 Aug 2004 13:52:12 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Here's an example of how JCSWorker can be extended to reassociate objects with a Hibernate session. This is absolutely mandatory when using Hibernate with Remote Cache and lazy loaded collections because without doing this, lazy loaded collections won't be able to find the session to reload themselves with. Where does this type of stuff belong, Aaron? Is there a application specific package things like this belong in? I have another... a OSCache->JCS bridge, which has proven quite useful. import java.io.Serializable; import java.util.Iterator; import java.util.List; import net.sf.hibernate.LockMode; import net.sf.hibernate.Session; import org.apache.jcs.utils.access.JCSWorker; import org.apache.jcs.utils.access.JCSWorkerHelper; import org.apache.log4j.Logger; import org.apache.log4j.Priority; public class HibernateJCSWorker extends JCSWorker { private static final Logger logger = Logger.getLogger(HibernateJCSWorker.class); public HibernateJCSWorker(String aName) { super(aName); } /** * @deprecated You should be using getResult(Serializable aKey, JCSWorkerHelper aWorker, Session aSession) throws Exception { */ public Object getResult(Serializable aKey, JCSWorkerHelper aWorker) throws Exception{ return getResult(aKey, null, aWorker, null); } /** * @deprecated You should be using getResult(Serializable aKey, String aGroup, JCSWorkerHelper aWorker, Session aSession) throws Exception { */ public Object getResult(Serializable aKey, String aGroup, JCSWorkerHelper aWorker) throws Exception{ return getResult(aKey, aGroup, aWorker, null); } /** * Wrapper on JCSWorker which takes a session to reassociate objects with. */ public Object getResult(Serializable aKey, JCSWorkerHelper aWorker, Session aSession) throws Exception { return getResult(aKey, null, aWorker, aSession); } /** * Wrapper on JCSWorker which takes a session to reassociate objects with. */ public Object getResult(Serializable aKey, String aGroup, JCSWorkerHelper aHelper, Session aSession) throws Exception { Object result = super.getResult(aKey, aGroup, aHelper); if(aSession == null){ return result; } try { if (result instanceof List) { for (Iterator i = ((List) result).iterator(); i.hasNext();) { Object o = i.next(); reassociate(o, aSession); } } else { reassociate(result, aSession); } } catch (Exception e) { if (logger.isEnabledFor(Priority.INFO)) { logger.info("Couldn't reassociate a session with a " + result); logger.info(e); } } return result; } /** * Reassociates an object with a session so lazy loaded collections will still work. */ public void reassociate(Object anObject, Session aSession) throws Exception { if (!aSession.contains(anObject)) { aSession.lock(anObject, LockMode.NONE); } } } -Travis Savo <smithpamela@example.org> --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org From turbine-jcs-dev-returnsmithpamela@example.org Mon Aug 09 21:01:13 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 99698 invoked from network); 9 Aug 2004 21:01:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 9 Aug 2004 21:01:13 -0000 Received: (qmail 92062 invoked by uid 500); 9 Aug 2004 21:00:44 -0000 Delivered-To: smithpamela@example.org Received: (qmail 92007 invoked by uid 500); 9 Aug 2004 21:00:43 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 91908 invoked by uid 99); 9 Aug 2004 21:00:42 -0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 09 Aug 2004 14:00:41 -0700 Date: Mon, 9 Aug 2004 14:00:40 -0700 (PDT) From: "Adam R. B. Jack" <smithpamela@example.org> To: Turbine JCS Developers List <smithpamela@example.org> cc: smithpamela@example.org Subject: RE: Cocoon and JCS (on Gump) In-Reply-To: <smithpamela@example.org> Message-ID: <smithpamela@example.org> References: <smithpamela@example.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Mon, 9 Aug 2004, Travis Savo wrote: > According to the change log Aaron Smuts made this change on 6/28/2004 in > order to make .dispose() visible to the clients of the JCS class. > > I expect it will be a permanent change because it's reasonable that clients > of the JCS class will want to dispose of a region themselves. > > The only problems I foresee with upgrading this in the field is if there's a > class that extends CacheAccess (which you appear to be doing). In this case > you will need to upgrade your code, but I expect this to be an isolated and > rare occurrence. Assuming that's not the case, I see no problems mixing jars > in the field in relationship to this change. > > Does that answer your question? First, thanks for the answer. Second, API changes happen (fact of life), and Gump (and my questions) are just trying to see if we can mitigate against issues in the field, be early detection and discussion/etc. Frankly, my low level java is insufficient to know if subtleties of access contraints (on a method) make it into the signature, and/or otherwith affect runtime. I could imagine that such a change annoys compilers, but slides through at runtime (in many case). I don't think there is an easy way for anybody to allow a transition path, given this type of change. As such, I suspect the correct approach is to note it, and try to move on. BTW: What would really help is notice of what releases the old 'signature' is in, and what release the new one might be in. Having this be in the RELEASE NOTES could help also. Could you answer that question, and try to remember it for the CHANGES notification. BTW: I'll CC the cocoon community on this one, to see if they are comfortable changing their code. Thanks for your help. regards Adam --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org From turbine-jcs-dev-returnsmithpamela@example.org Tue Aug 10 05:53:18 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 46931 invoked from network); 10 Aug 2004 05:53:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 10 Aug 2004 05:53:18 -0000 Received: (qmail 11366 invoked by uid 500); 10 Aug 2004 05:53:17 -0000 Delivered-To: smithpamela@example.org Received: (qmail 11315 invoked by uid 500); 10 Aug 2004 05:53:17 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 11302 invoked by uid 99); 10 Aug 2004 05:53:16 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO amsfep12-int.chello.nl) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 09 Aug 2004 22:53:14 -0700 Received: from nixis ([83.161.120.155]) by amsfep12-int.chello.nl (InterMail vM.83.161.120.155 201-2115-109-103-20031105) with ESMTP id <20040810055311.PYDK2608.amsfep12-int.chello.nl@nixis> for <smithpamela@example.org>; Tue, 10 Aug 2004 07:53:11 +0200 From: "David Vismans" <smithpamela@example.org> To: "'Turbine JCS Developers List'" <smithpamela@example.org> Subject: RE: Newbie: pulling my hair out with remote cache Date: Tue, 10 Aug 2004 07:56:06 +0200 Message-ID: <01c201c47e9e$ba387050$69fc8418@nixis> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 In-Reply-To: <smithpamela@example.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > You have the remote server configured to invalidate items on > other local caches when something is put into the originating > local cache. When an item is put in C1 it tells CS, CS then > tells all other registered caches, in this case C2, to remove > the item. The setting is in this line. If you don't want > this behavior, then set this to false. > > jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true > > Having this set to true is recommended for situations where > the data on a particular machine may be somewhat user > specific. There are some case, like this, where you don't > want the items stored in memory to be the same on all machines. > > Cheers, > > Aaron Thank you for the quick reply. I know about this parameter, and eventhough it is set to true now I've tried it with both settings. The thing is CS does also not message C2 to invalidate the item. C2, pulls the old version of the same key out of local memory eventhough C1 has updated locally and propagated its new value to CS. CS simply doesn't talk to C2. When I start C2 up it does however register it listener with CS. Any thoughts? Thanks again. David Below are my config files again and my original description of the problem. C1: # PRE-DEFINED CACHE REGIONS jcs.region.Tasks=DC,RFailover jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt ributes jcs.region.Tasks.cacheattributes.MaxObjects=1000 jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m emory.lru.LRUMemoryCache jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600 jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60 jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut es jcs.region.Tasks.elementattributes.IsEternal=false jcs.region.Tasks.elementattributes.IdleTime=1800 jcs.region.Tasks.elementattributes.IsSpool=true jcs.region.Tasks.elementattributes.IsRemote=true jcs.region.Tasks.elementattributes.IsLateral=false jcs.system.groupIdCache=jcs.system.groupIdCache.cacheattributes=org.apac he.jcs.engine.CompositeCacheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e ngine.memory.lru.LRUMemoryCache # 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.RemoteHost=localhost jcs.auxiliary.RFailover.attributes.RemotePort=2099 jcs.auxiliary.RFailover.attributes.LocalPort=2103 #jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:2099 jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true jcs.auxiliary.RFailover.attributes.GetOnly=false #jcs.auxiliary.RFailover.attributes.RemoteTypeName=REMOTE # AVAILABLE AUXILIARY CACHES jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF actory jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/diskcachelocal jcs.auxiliary.DC.attributes.maxKeySize=1000 ------------------ C2: # PRE-DEFINED CACHE REGIONS jcs.region.Tasks=DC,RFailover jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt ributes jcs.region.Tasks.cacheattributes.MaxObjects=1000 jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m emory.lru.LRUMemoryCache jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600 jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60 jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut es jcs.region.Tasks.elementattributes.IsEternal=false jcs.region.Tasks.elementattributes.IdleTime=1800 jcs.region.Tasks.elementattributes.IsSpool=true jcs.region.Tasks.elementattributes.IsRemote=true jcs.region.Tasks.elementattributes.IsLateral=false jcs.system.groupIdCache=jcs.system.groupIdCache.cacheattributes=org.apac he.jcs.engine.CompositeCacheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e ngine.memory.lru.LRUMemoryCache # 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.RemoteHost=localhost jcs.auxiliary.RFailover.attributes.RemotePort=2099 jcs.auxiliary.RFailover.attributes.LocalPort=2102 #jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:2099 jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true #jcs.auxiliary.RFailover.attributes.RemoteTypeName=REMOTE jcs.auxiliary.RFailover.attributes.GetOnly=false #jcs.auxiliary.RFailover.attributes.GetOnly=false #jcs.auxiliary.RFailover.attributes.RemoteServiceName=RemoteCache # AVAILABLE AUXILIARY CACHES jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF actory jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/updateclient1 jcs.auxiliary.DC.attributes.maxKeySize=1000 -------------- CS: registry.host=localhost registry.port=2099 remote.cache.service.port=2099 remote.tomcat.on=false remote.cluster.LocalClusterConsistency=true jcs.system.groupIdCache=DC jcs.system.groupIdCache.cacheattributes=org.apache.jcs.engine.CompositeC acheAttributes jcs.system.groupIdCache.cacheattributes.MaxObjects=10000 jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e ngine.memory.lru.LRUMemoryCache jcs.system.groupIdCache.elementattributes=org.apache.jcs.engine.ElementA ttributes jcs.system.groupIdCache.elementattributes.IsEternal=true jcs.system.groupIdCache.elementattributes.MaxLifeSeconds=3600 jcs.system.groupIdCache.elementattributes.IdleTime=1800 jcs.system.groupIdCache.elementattributes.IsSpool=true jcs.system.groupIdCache.elementattributes.IsRemote=false jcs.system.groupIdCache.elementattributes.IsLateral=false # DEFAULT CACHE REGION jcs.default=DC jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttribut es jcs.default.cacheattributes.MaxObjects=10000 jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory .lru.LRUMemoryCache jcs.default.elementattributes.IsEternal=false jcs.default.elementattributes.MaxLifeSeconds=3600 jcs.default.elementattributes.IdleTime=1800 jcs.default.elementattributes.IsSpool=true jcs.default.elementattributes.IsRemote=true jcs.default.elementattributes.IsLateral=false # PRE-DEFINED CACHE REGIONS jcs.region.Tasks=DC jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt ributes jcs.region.Tasks.cacheattributes.MaxObjects=1000 jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m emory.lru.LRUMemoryCache jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600 jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60 jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut es jcs.region.Tasks.elementattributes.IsEternal=true jcs.region.Tasks.elementattributes.IdleTime=1800 jcs.region.Tasks.elementattributes.IsSpool=true jcs.region.Tasks.elementattributes.IsRemote=true jcs.region.Tasks.elementattributes.IsLateral=false # AVAILABLE AUXILIARY CACHES jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF actory jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe dDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/diskcacheremote/ jcs.auxiliary.DC.attributes.maxKeySize=100000 jcs.auxiliary.DC.elementattributes=org.apache.jcs.engine.ElementAttribut es jcs.auxiliary.DC.elementattributes.IsEternal=true jcs.auxiliary.DC.elementattributes.IdleTime=1800 jcs.auxiliary.DC.elementattributes.IsSpool=true jcs.auxiliary.DC.elementattributes.IsRemote=true jcs.auxiliary.DC.elementattributes.IsLateral=false > > > -----Original Message----- > From: David Vismans [mailto:smithpamela@example.org] > Sent: Monday, August 09, 2004 5:13 AM > To: smithpamela@example.org > Subject: Newbie: pulling my hair out with remote cache > > Hi everyone, > > First, JCS looks great! Looking forward to some extensive > usage. However, I have been trying to get the remote cache > working for about a week now, and I am not succeeding. > > Here's the setup: > > C1 (client 1) pushes an element E in it's local cache. > CS (server) receives (the update of) this object and does store it. > > C2 (client 2) is able to retrieve the cached element E from CS. > > so far so good, > > but when C1 repetitively updates E (named "test") with a > random integer value, C2 is not notified of the new value for > this key. CS DOES receive the element, but does not propagate to C2. > > I have read through every example and also mailinglist > messages I still have not found the solution. > > I got JCS from the CVS and RMI is working, I created the > stubs etc. I am using the latest jdk on windows xp home edition. > > Perhaps an interesting detail: I did not get the lateral > cache to propagate either (there is no firewall running). All > clients and the server run on the same machine. > > If anyone could help me out here I would really appreciate it! > > Thanks in advance, > > David --------------------------------------------------------------------- To unsubscribe, e-mail: smithpamela@example.org For additional commands, e-mail: smithpamela@example.org From turbine-jcs-dev-returnsmithpamela@example.org Tue Aug 10 08:11:14 2004 Return-Path: <turbine-jcs-dev-returnsmithpamela@example.org> Delivered-To: smithpamela@example.org Received: (qmail 24991 invoked from network); 10 Aug 2004 08:11:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 10 Aug 2004 08:11:14 -0000 Received: (qmail 78957 invoked by uid 500); 10 Aug 2004 08:11:13 -0000 Delivered-To: smithpamela@example.org Received: (qmail 78923 invoked by uid 500); 10 Aug 2004 08:11:13 -0000 Mailing-List: contact smithpamela@example.org; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:smithpamela@example.org> List-Subscribe: <mailto:smithpamela@example.org> List-Help: <mailto:smithpamela@example.org> List-Post: <mailto:smithpamela@example.org> List-Id: "Turbine JCS Developers List" <turbine-jcs-dev.jakarta.apache.org> Reply-To: "Turbine JCS Developers List" <smithpamela@example.org> Delivered-To: mailing list smithpamela@example.org Received: (qmail 78908 invoked by uid 99); 10 Aug 2004 08:11:12 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO web12207.mail.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.27.1) with SMTP; Tue, 10 Aug 2004 01:11:08 -0700 Message-ID: <smithpamela@example.org> Received: from [83.161.120.155] by web12207.mail.yahoo.com via HTTP; Tue, 10 Aug 2004 01:11:07 PDT Date: Tue, 10 Aug 2004 01:11:07 -0700 (PDT) From: Hanson Char <smithpamela@example.org> Subject: RE: Newbie: pulling my hair out with remote cache To: Turbine JCS Developers List <smithpamela@example.org> In-Reply-To: <01c201c47e9e$ba387050$69fc8418@nixis> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Have you tried putting the remote CS on a different physical machine, instead of the same to see if it makes a difference ? Hanson --- David Vismans <smithpamela@example.org> wrote: > > You have the remote server configured to > invalidate items on > > other local caches when something is put into the > originating > > local cache. When an item is put in C1 it tells > CS, CS then > > tells all other registered caches, in this case > C2, to remove > > the item. The setting is in this line. If you > don't want > > this behavior, then set this to false. > > > > > jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true > > > > Having this set to true is recommended for > situations where > > the data on a particular machine may be somewhat > user > > specific. There are some case, like this, where > you don't > > want the items stored in memory to be the same on > all machines. > > > > Cheers, > > > > Aaron > > Thank you for the quick reply. > > I know about this parameter, and eventhough it is > set to true now I've > tried it with both settings. > > The thing is CS does also not message C2 to > invalidate the item. C2, > pulls the old version of the same key out of local > memory eventhough C1 > has updated locally and propagated its new value to > CS. CS simply > doesn't talk to C2. When I start C2 up it does > however register it > listener with CS. > > Any thoughts? > > Thanks again. > > David > > Below are my config files again and my original > description of the > problem. > > C1: > # PRE-DEFINED CACHE REGIONS > jcs.region.Tasks=DC,RFailover > jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt > ributes > jcs.region.Tasks.cacheattributes.MaxObjects=1000 > jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m > emory.lru.LRUMemoryCache > jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false > jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600 > jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60 > jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut > es > jcs.region.Tasks.elementattributes.IsEternal=false > jcs.region.Tasks.elementattributes.IdleTime=1800 > jcs.region.Tasks.elementattributes.IsSpool=true > jcs.region.Tasks.elementattributes.IsRemote=true > jcs.region.Tasks.elementattributes.IsLateral=false > > jcs.system.groupIdCache=jcs.system.groupIdCache.cacheattributes=org.apac > he.jcs.engine.CompositeCacheAttributes > jcs.system.groupIdCache.cacheattributes.MaxObjects=10000 > jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e > ngine.memory.lru.LRUMemoryCache > > # 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.RemoteHost=localhost > jcs.auxiliary.RFailover.attributes.RemotePort=2099 > jcs.auxiliary.RFailover.attributes.LocalPort=2103 > #jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:2099 > jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true > jcs.auxiliary.RFailover.attributes.GetOnly=false > #jcs.auxiliary.RFailover.attributes.RemoteTypeName=REMOTE > > # AVAILABLE AUXILIARY CACHES > jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF > actory > jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe > dDiskCacheAttributes > jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/diskcachelocal > jcs.auxiliary.DC.attributes.maxKeySize=1000 > > ------------------ > C2: > > # PRE-DEFINED CACHE REGIONS > jcs.region.Tasks=DC,RFailover > jcs.region.Tasks.cacheattributes=org.apache.jcs.engine.CompositeCacheAtt > ributes > jcs.region.Tasks.cacheattributes.MaxObjects=1000 > jcs.region.Tasks.cacheattributes.MemoryCacheName=org.apache.jcs.engine.m > emory.lru.LRUMemoryCache > jcs.region.Tasks.cacheattributes.UseMemoryShrinker=false > jcs.region.Tasks.cacheattributes.MaxMemoryIdleTimeSeconds=3600 > jcs.region.Tasks.cacheattributes.ShrinkerIntervalSeconds=60 > jcs.region.Tasks.elementattributes=org.apache.jcs.engine.ElementAttribut > es > jcs.region.Tasks.elementattributes.IsEternal=false > jcs.region.Tasks.elementattributes.IdleTime=1800 > jcs.region.Tasks.elementattributes.IsSpool=true > jcs.region.Tasks.elementattributes.IsRemote=true > jcs.region.Tasks.elementattributes.IsLateral=false > > jcs.system.groupIdCache=jcs.system.groupIdCache.cacheattributes=org.apac > he.jcs.engine.CompositeCacheAttributes > jcs.system.groupIdCache.cacheattributes.MaxObjects=10000 > jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e > ngine.memory.lru.LRUMemoryCache > > # 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.RemoteHost=localhost > jcs.auxiliary.RFailover.attributes.RemotePort=2099 > jcs.auxiliary.RFailover.attributes.LocalPort=2102 > #jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:2099 > jcs.auxiliary.RFailover.attributes.RemoveUponRemotePut=true > #jcs.auxiliary.RFailover.attributes.RemoteTypeName=REMOTE > jcs.auxiliary.RFailover.attributes.GetOnly=false > #jcs.auxiliary.RFailover.attributes.GetOnly=false > #jcs.auxiliary.RFailover.attributes.RemoteServiceName=RemoteCache > > # AVAILABLE AUXILIARY CACHES > jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF > actory > jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe > dDiskCacheAttributes > jcs.auxiliary.DC.attributes.DiskPath=C:/Temp/updateclient1 > jcs.auxiliary.DC.attributes.maxKeySize=1000 > > -------------- > CS: > registry.host=localhost > registry.port=2099 > remote.cache.service.port=2099 > remote.tomcat.on=false > remote.cluster.LocalClusterConsistency=true > > jcs.system.groupIdCache=DC > jcs.system.groupIdCache.cacheattributes=org.apache.jcs.engine.CompositeC > acheAttributes > jcs.system.groupIdCache.cacheattributes.MaxObjects=10000 > jcs.system.groupIdCache.cacheattributes.MemoryCacheName=org.apache.jcs.e > ngine.memory.lru.LRUMemoryCache > jcs.system.groupIdCache.elementattributes=org.apache.jcs.engine.ElementA > ttributes > jcs.system.groupIdCache.elementattributes.IsEternal=true > jcs.system.groupIdCache.elementattributes.MaxLifeSeconds=3600 > jcs.system.groupIdCache.elementattributes.IdleTime=1800 > jcs.system.groupIdCache.elementattributes.IsSpool=true > jcs.system.groupIdCache.elementattributes.IsRemote=false > jcs.system.groupIdCache.elementattributes.IsLateral=false > >
{'source': 'Apache Software Foundation Public Mail Archives'}