Hi Aaron, With your help, now my lateral tcp cache(TCP and UDP) is working now. I saved cache.cff file to $TOMCAT_HOME/common/calsses, then deployed my web application. All the report data are present in all jcs local cache. If the report data exists in momory, the data will be removed after Tomcat Server is shutdown. If the data was written to disk cache (jcs.auxiliary.DC.attributes.DiskPath=C:\\Temp\\JCS_cache1), then the data still exist in C:\\Temp\\JCS_cache1 after Tomcat is shutdown. Why JCS cannot removed all the data in the local cache(momory and disk cache) when the Tomcat is shutdown? Is there any way to clear the cache when Tomcat is shutdown? Many thanks, Emily Aaron Smuts <[EMAIL PROTECTED]> wrote: UDP discovery is documented here: http://jakarta.apache.org/jcs/LateralUDPDiscovery.html
With UDP discovery you don't have to specify the servers to connect to; instead, they find each other using the udp discovery port and address. All servers that you want to be able to find ech other should be configured to use the same discovery address and port. You still need to define a TCPListenerPort. If both of your servers are on the same machine, then this port must be different on each. Basically, they learn about each other by UDP. Then when they find each other they connect to each other on the tcp listener port. Aaron --- emily chen wrote: > Hi Aaron, > > I found an example that you post in the mail list: > http://mail-archives.apache.org/mod_mbox/jakarta-jcs-users/200606.mbox/[EMAIL PROTECTED] > > But I don't know how do I config the following > attributes of Lateral UDP Discovery if I have two > Tomcat servers runing in my PC: > > > jcs.auxiliary.LTCPAIR.attributes.TcpListenerPort=1118 > jcs.auxiliary.LTCPAIR.attributes.UdpDiscoveryAddr=228.5.6.1 > jcs.auxiliary.LTCPAIR.attributes.UdpDiscoveryPort=6773 > jcs.auxiliary.LTCPAIR.attributes.UdpDiscoveryEnabled=true > jcs.auxiliary.LTCPAIR.attributes.Receive=true > jcs.auxiliary.LTCPAIR.attributes.AllowGet=false > jcs.auxiliary.LTCPAIR.attributes.IssueRemoveOnPut=false > jcs.auxiliary.LTCPAIR.attributes.FilterRemoveByHashCode=true > > > Thanks for your help. > > Emily > > > > > Aaron Smuts wrote: > Please think a bit about what the configuration is > supposed to accomplish, and the problem should be > clear. You tell one client where to find the others > in the "TcpServers" setting. The "TcpListenerPort" > is > the port at which this client listens. > > If server 2 is listening to port 1111, the server 1 > should be configured like this: > > jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111 > > jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110 > > And server 2 should be configured like this: > > jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1110 > jcs.auxiliary.LTCP.attributes.TcpListenerPort=1111 > > I'd recommend using UDP discovery, which greatly > simplfies these issues. > > Cheers, > > Aaron > > --- emily chen wrote: > > > Hi Aaron, > > > > I did a testing, used different port in cache.ccf > > file, and still got the same error: > > > > cache.ccf for web applicaton in Tomcat1: > > > > > jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1110 > > > > jcs.auxiliary.LTCP.attributes.TcpListenerPort=1110 > > > > cache.ccf for web applicaton in Tomcat2: > > > > > jcs.auxiliary.LTCP.attributes.TcpServers=localhost:1111 > > > > jcs.auxiliary.LTCP.attributes.TcpListenerPort=1111 > > > > and got following error message: > > ----------------------------------------------- > > 2006-06-26 11:38:59,540 [http-8080-Processor25] > > INFO > > > org.apache.jcs.engine.control.CompositeCacheManager > > - Creating cache manager from config file: > > /cache.ccf > > 2006-06-26 11:38:59,540 [http-8080-Processor25] > INFO > > org.apache.jcs.utils.threadpool.ThreadPoolManager > - > > thread_pool.default PoolConfiguration = > useBoundary > > = [true]boundarySize = [2000]maximumPoolSize = > > [150]minimumPoolSize = [4]keepAliveTime = > > [300000]whenBlockedPolicy = [RUN]startUpSize = [4] > > 2006-06-26 11:38:59,556 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.engine.control.CompositeCacheConfigurator > > - Setting default auxiliaries to DC,LTCP > > 2006-06-26 11:38:59,556 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.engine.control.CompositeCacheConfigurator > > - setting defaultCompositeCacheAttributes to [ > > useLateral = true, useRemote = true, useDisk = > true, > > maxObjs = 0, maxSpoolPerRun = -1 ] > > 2006-06-26 11:38:59,556 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.engine.control.CompositeCacheConfigurator > > - No special ElementAttribute class defined for > key > > [jcs.default.elementattributes], using default > > class. > > 2006-06-26 11:38:59,556 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.engine.control.CompositeCacheConfigurator > > - setting defaultElementAttributes to [ IS_LATERAL > = > > true, IS_SPOOL = true, IS_REMOTE = true, > IS_ETERNAL > > = false, MaxLifeSeconds = 3600, IdleTime = 1800, > > CreateTime = 1151347139556, LastAccessTime = > > 1151347139556, getTimeToLiveSeconds() = 3600, > > createTime = 1151347139556 ] > > 2006-06-26 11:38:59,556 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.engine.control.CompositeCacheConfigurator > > - Parsed regions [] > > 2006-06-26 11:38:59,556 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.engine.control.CompositeCacheConfigurator > > - Finished configuration in 0 ms. > > 2006-06-26 11:38:59,556 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.engine.control.CompositeCacheConfigurator > > - No special ElementAttribute class defined for > key > > > [jcs.region.ePINBatchReportCache.elementattributes], > > using default class. > > 2006-06-26 11:38:59,587 [http-8080-Processor25] > INFO > > org.apache.jcs.engine.memory.lru.LRUMemoryCache - > > initialized LRUMemoryCache for > ePINBatchReportCache > > 2006-06-26 11:38:59,587 [http-8080-Processor25] > INFO > > org.apache.jcs.engine.control.CompositeCache - > > Constructed cache with name: ePINBatchReportCache > > 2006-06-26 11:38:59,649 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache > > - Cache file root directory: C:\Temp\JCS_cache1 > > 2006-06-26 11:38:59,665 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache > > - Set maxKeySize to: '10000' > > 2006-06-26 11:38:59,665 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache > > - Set recycle max Size to MaxRecycleBinSize: > '7500' > > 2006-06-26 11:38:59,681 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheManager > > - Instance for [localhost:1110:1110] is null, > > creating > > 2006-06-26 11:38:59,681 [http-8080-Processor25] > INFO > > > > > org.apache.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheManager > > - Creating TCP service, lca = localhost:1110:1110 > > 2006-06-26 11:39:00,665 [http-8080-Processor25] > > ERROR > > > org.apache.jcs.auxiliary.lateral.socket.tcp.LateralTCPService > > - Could not create sender to [localhost:1110] -- > > Socket is null, cannot connect to localhost:1110 > > 2006-06-26 11:39:00,665 [http-8080-Processor25] > > ERROR > > > === message truncated === --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com