Return-Path: Delivered-To: apmail-jakarta-jcs-users-archive@www.apache.org Received: (qmail 61770 invoked from network); 20 Jun 2006 19:29:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jun 2006 19:29:28 -0000 Received: (qmail 41214 invoked by uid 500); 20 Jun 2006 19:29:27 -0000 Delivered-To: apmail-jakarta-jcs-users-archive@jakarta.apache.org Received: (qmail 41196 invoked by uid 500); 20 Jun 2006 19:29:27 -0000 Mailing-List: contact jcs-users-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JCS Users List" Delivered-To: mailing list jcs-users@jakarta.apache.org Received: (qmail 41185 invoked by uid 99); 20 Jun 2006 19:29:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 12:29:27 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.191.125.88] (HELO web38712.mail.mud.yahoo.com) (209.191.125.88) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 20 Jun 2006 12:29:26 -0700 Received: (qmail 80120 invoked by uid 60001); 20 Jun 2006 19:29:05 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=0KVNIpOf09/ZP+8+4ezKs33DMHaTM8BAbGbUMhXDxUxp8pINWr/n6swzNV/PJSh2/IzdhNFpNDivTozYqAB6t5JpUNtCN2o8oCp57u4rpj+VpA7od7PD0/fkQkq7NVFSS8zLZwah2I7d6ugIkunPb0nMYYYzgm/e3FGz0RmvdL0= ; Message-ID: <20060620192905.80118.qmail@web38712.mail.mud.yahoo.com> Received: from [151.193.220.27] by web38712.mail.mud.yahoo.com via HTTP; Tue, 20 Jun 2006 12:29:05 PDT Date: Tue, 20 Jun 2006 12:29:05 -0700 (PDT) From: Aaron Smuts Subject: Re: How to start up Remote Cache Server in my PC To: JCS Users List In-Reply-To: <20060620185027.48482.qmail@web55203.mail.re4.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hmmn. It looks like a page of documentation is missing. To run the remote service inside of tomcat, you can initialize this servlet: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java?revision=415432&view=markup There are some scripts in the src/scripts directory for starting and stopping the server that do what the startup servlet does: start the registry and then call RemoteCacheServerFactory.startup( registryHost, registryPort, "/" + DEFAULT_PROPS_FILE_NAME ); --- emily chen wrote: > Hi there, > > I try to use JCS for my web application. I > reviewed the project document, and found it doesn't > specify how to start up a remote cache server in my > Local PC. > > I wrote a simple testing program TestJCS.java. I > got following error when I run TestJCS: > > ------------------------------------------------------------------------------------------------ > 2006-06-19 15:48:18,326 [main] ERROR > org.apache.jcs.auxiliary.remote.RemoteCacheManager - > Problem finding server at > [//localhost:1102/org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheService] > java.rmi.ConnectException: Connection refused to > host: localhost; nested exception is: > java.net.ConnectException: Connection refused: > connect > at > sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574) > at > sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185) > at > sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171) > at > sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306) > at > sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown > Source) > at java.rmi.Naming.lookup(Naming.java:84) > at > org.apache.jcs.auxiliary.remote.RemoteCacheManager.(RemoteCacheManager.java:111) > > > > here is my cache.ccf file: > ------------------------------------ > > ################################################################## > # DEFAULT CACHE REGION > # sets the default aux value for any non configured > caches > ################################################################# > #jcs.default=DC > jcs.default=DC,RFailover > jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes > jcs.default.cacheattributes.MaxObjects=0 > 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=true > > ###################################################### > # CACHE REGIONS AVAILABLE > # Regions preconfigured for caching > ##################################################### > #jcs.region.bookCache=DC > jcs.region.bookCache=DC,RFailover > jcs.region.bookCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes > jcs.region.bookCache.cacheattributes.MaxObjects=0 > jcs.region.bookCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache > jcs.region.bookCache.elementattributes.IsEternal=false > jcs.region.bookCache.elementattributes.MaxLifeSeconds=7200 > jcs.region.bookCache.elementattributes.IdleTime=1800 > jcs.region.bookCache.elementattributes.IsSpool=true > jcs.region.bookCache.elementattributes.IsRemote=true > jcs.region.bookCache.elementattributes.IsLateral=true > > ############################################################################ > # AUXILIARY CACHES AVAILABLE > # 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=C:\\Temp\\JCS_cache > jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000 > jcs.auxiliary.DC.attributes.MaxKeySize=10000 > jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000 > jcs.auxiliary.DC.attributes.MaxRecycleBinSize=7500 > ####################################### > # Remote RMI Cache set up to failover > ####################################### > jcs.auxiliary.RFailover=org.apache.jcs.auxiliary.remote.RemoteCacheFactory > jcs.auxiliary.RFailover.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes > jcs.auxiliary.RFailover.attributes.RemoteTypeName=LOCAL > jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:1102,localhost:1103 > jcs.auxiliary.RFailover.attributes.GetOnly=false > > > and here is remote.cache.ccf file: > ----------------------------------------------- > > ############################################################## > ################## REMOTE SERVER CONFIG RS1 > ################# > # Registry used to register and provide the > IRmiCacheService service. > registry.host=localhost > registry.port=1102 > # call back port to local caches. > remote.cache.service.port=1102 > # cluster setting > remote.cluster.LocalClusterConsistency=true > > # RS2 SERVER to update for clustering > jcs.auxiliary.RCluster=org.apache.jcs.auxiliary.remote.RemoteCacheFactory > jcs.auxiliary.RCluster.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes > #jcs.auxiliary.RCluster.attributes.RemoteTypeName=CLUSTER > jcs.auxiliary.RCluster.attributes.RemoteTypeName=LOCAL > jcs.auxiliary.RCluster.attributes.RemoveUponRemotePut=false > jcs.auxiliary.RCluster.attributes.ClusterServers=localhost:1102 > jcs.auxiliary.RCluster.attributes.GetOnly=false > jcs.auxiliary.RCluster.attributes.LocalClusterConsistency=true > > > This is the first time I used JCS. Could you > please tell me how to start up Remot Cache Server in > my local PC. > > Many thanks, > > Lucy > > > > > --------------------------------- > Ring'em or ping'em. Make PC-to-phone calls as low > as 1�/min with Yahoo! Messenger with Voice. --------------------------------------------------------------------- To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org For additional commands, e-mail: jcs-users-help@jakarta.apache.org