still same problem coming can u plz. go through my cache.ccf file and cache manager class
Thanks&Regards Sambasiva Reddy On 11/8/06, Dennis Jacobs <[EMAIL PROTECTED]> wrote:
Documentation: http://jakarta.apache.org/jcs/BasicJCSConfiguration.html Also check the other links in the left navigation under 'JCS User's Guide'. For persistence look into using the disk cache with .cacheattributes.DiskUsagePatternName=UPDATE and/or .cacheattributes.MaxObjects=0. But please, look over the documentation in detail. _Dennis -----Original Message----- From: Sambasiva Reddy [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 08, 2006 6:41 AM To: JCS Users List Subject: [bayes][heur][faked-from] Re: Help for cache.ccf file can u plz. send me the doc. link??? still now i didn't read any docs. Thanks & Sorry Sambasiva Reddy On 11/8/06, Aaron Smuts <[EMAIL PROTECTED]> wrote: > Read the docs. JCS can persist. Stop asking such > basic questions that are covered in the documentation. > > --- Sambasiva Reddy <[EMAIL PROTECTED]> > wrote: > > > but one more doubt is if that is not persisted, what > > is the use of JCS???? > > > > > > On 11/8/06, Ard Schrijvers <[EMAIL PROTECTED]> > > wrote: > > > > > > > Suppose, your key is an instanceof YourCacheKey. > > Now, if your > > > > YourCacheKey does not override the default > > equals and hashcode from > > > > Object, your key object in the second run won't > > be found if it is a > > > > new key > > > > > > No, it does not apply to your thing, because you > > are using a string as key. Just read this line: > > > > > > Your cache is not persistent between two runs!!! > > So if you put it in one, and you want to get it in > > another run, it is gone. > > > > > > I am new to jcs as well, > > > > > > Ard > > > > > > > > > > > > > > > can u plz. explain this how to do, bcoz i'm new > > to JCS. > > > > plz. don't think like basic question > > > > > > > > > > > > On 11/8/06, Ard Schrijvers > > <[EMAIL PROTECTED]> wrote: > > > > > Yes, but you are saying yourself, that in the > > second run > > > > you do not put the object in cache, and I told > > you your cache > > > > is not persistent between runs > > > > > > > > > > > > > > > > > when in 2nd run for only get() method > > cache.get() returning > > > > > > null value. > > > > > > > > > > > > if u have source code about this send to me > > > > > > > > > > > > Thanks&Regards > > > > > > Sambasiva Reddy > > > > > > CTS > > > > > > > > > > > > On 11/8/06, Ard Schrijvers > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > when i commented List > > l1=(ArrayList)db.load(key) and > > > > > > > > cm.putCacheObject(key,l1) > > > > > > > > then cm.getCacheObject returning null > > value. > > > > > > > > > > > > > > Yes, but why do you think in a second run > > it would still be > > > > > > in cache? > > > > > > > > > > > > > > > > > > > > > > > that is problem. > > > > > > > > > > > > > > > > Thanks & Regards > > > > > > > > Sambasiva Reddy > > > > > > > > CTS > > > > > > > > > > > > > > > > On 11/8/06, Sambasiva Reddy > > > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > public class client { > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > public static void main(String []a){ > > > > > > > > > > > > > > > > > > CacheManager > > cm=CacheManager.getInstance(); > > > > > > > > > > > > > > > > > > String key="4.43.114.16"; > > > > > > > > > Database db=new Database(); > > > > > > > > > List l1=(ArrayList)db.load(key); > > > > > > > > > cm.putCacheObject(key,l1); > > > > > > > > > List > > list=(ArrayList)cm.getCacheObject(key); > > > > > > > > > System.out.println(list); > > > > > > > > > } > > > > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > On 11/8/06, Ard Schrijvers > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > yaa may b dis is correct. can u > > plz. explain properly... > > > > > > > > > > > > > > > > > > > > can you mail the code? > > > > > > > > > > > > > > > > > > > > Ard > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > advanced thanks.. > > > > > > > > > > > Sambasiva Reddy > > > > > > > > > > > > > > > > > > > > > > On 11/8/06, Ard Schrijvers > > > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > i did debugging that > > cache.put() is > > > > returning null. i > > > > > > > > > > > don't have idea > > > > > > > > > > > > > about configure() method > > > > > > > > > > > > > is it useful for what > > purpose?? when i checked > > > > > > > > > > > isPresent() metod.but > > > > > > > > > > > > > it is showing false. > > > > > > > > > > > > > > > > > > > > > > > > > > 1st run: > > > > > > > > > > > > > > > load(key),cache.put(key,object),cache.get(key) > > > > > > > > working properly. > > > > > > > > > > > > > > > > > > > > > > > > > > 2nd run: > > > > > > > > > > > > > cache.get(key) returning null > > value. and isPresent() > > > > > > > > > > > showing false. > > > > > > > > > > > > > > > > > > > > > > > > Do you re-create the key object? > > > > > > > > > > > > > > > > > > > > > > > > It might be that your key object > > does not > > > > have the proper > > > > > > > > > > > equals and hashCode > > implementation. > > > > > > > > > > > > > > > > > > > > > > > > Suppose, your key is an > > instanceof > > > > YourCacheKey. Now, if > > > > > > > > > > > your YourCacheKey does not > > override the default > > > > equals and > > > > > > > > > > > hashcode from Object, your key > > object in the second > > > > > > run won't > > > > > > > > > > > be found if it is a new key > > > > > > > > > > > > > > > > > > > > > > > > Ard > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks & Regards, > > > > > > > > > > > > > Sambasiva Reddy, > > > > > > > > > > > > > CTS > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 11/8/06, Ard Schrijvers > > > > > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > if i run program, cache > > manager is > > > > instantiating and > > > > > > > > > > > > > putting,getting > > > > > > > > > > > > > > > objects from/to is > > working. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > when i run again that > > objects not retrieving > > > > > > > > from jcs using > > > > > > > > > > > > > > > get() method. > > > > > > > > > > > > > > > > > > > > > > > > > > > > You are talking about > > different JVM runs? I > > > > > > do not know if > > > > > > > > > > > > > your cache is re-populated at > > the next run. I > > > > > > do not know if > > > > > > > > > > > > > this is configurable (flush > > the cache to disk > > > > > > at shutdown). > > > > > > > > > > > > > Anyway, do some debugging in > > the next run, like > > > > > > getting the > > > > > > > > > > > > > number of items in the cache. > > Probably, it is just > > > > > > > > empty when > > > > > > > > > > > > > running again. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Ard > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > can u tell me. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 11/8/06, Ard Schrijvers > > > === message truncated === > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]