jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sambasiva Reddy" <sambasivaredd...@gmail.com>
Subject Re: Help for cache.ccf file
Date Wed, 08 Nov 2006 14:14:53 GMT
and also can u plz. send some source code regarding this problem

Thanks
Sambasiva Reddy
CTS

On 11/8/06, Sambasiva Reddy <sambasivareddy.s@gmail.com> 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
>
>
> 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 <a.schrijvers@hippo.nl> 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 <a.schrijvers@hippo.nl> 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 <sambasivareddy.s@gmail.com> 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 <a.schrijvers@hippo.nl> 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 <a.schrijvers@hippo.nl>
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
> > > <a.schrijvers@hippo.nl> 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
> > > > > <a.schrijvers@hippo.nl> wrote:
> > > > > > > > > > > > > very basic one, but as Denis
is pointing
> > > out, you have
> > > > > > > > > > > > *many* examples in svn:
> > > > > > > > > > > > >
> > > > > > > > > > > > > jcs.default=DC
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCac
> > > > > > > > > > > > heAttributes
> > > > > > > > > > > > > jcs.default.cacheattributes.MaxObjects=100
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.eng
> > > > > > > > > > > > ine.memory.lru.LRUMemoryCache
> > > > > > > > > > > > >
> > > > > > > > > > > > > ##### AUXILIARY CACHES
> > > > > > > > > > > > >
> > > > > > > > > > > > > # Indexed Disk Cache
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.Indexed
> > > > > > > > > > > > DiskCacheFactory
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.inde
> > > > > > > > > > > > xed.IndexedDiskCacheAttributes
> > > > > > > > > > > > > #jcs.auxiliary.DC.attributes.DiskPath=
> > > > > > > > > > > > >
> > > > > > > > > > > > > # PRE-DEFINED CACHE REGIONS
> > > > > > > > > > > > >
> > > > > > > > > > > > > jcs.region.main=DC
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > jcs.region.main.cacheattributes=org.apache.jcs.engine.Composit
> > > > > > > > > > > > eCacheAttributes
> > > > > > > > > > > > > jcs.region.main.cacheattributes.MaxObjects=100
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > jcs.region.main.cacheattributes.MemoryCacheName=org.apache.jcs
> > > > > > > > > > > > .engine.memory.lru.LRUMemoryCache
> > > > > > > > > > > > >
> > > jcs.region.main.cacheattributes.UseMemoryShrinker=true
> > > > > > > > > > > > >
> > > > > > > >
> > > jcs.region.main.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> > > > > > > > > > > > >
> > > > > jcs.region.main.cacheattributes.ShrinkerIntervalSeconds=60
> > > > > > > > > > > > >
> > > > > > > > > > > > > Regards Ard
> > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi,
> > > > > > > > > > > > > > i need cache.ccf file
for disk caching
> > > > > configuration.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Thanks&regards
> > > > > > > > > > > > > > Sambasiva Reddy
> > > > > > > > > > > > > > CTS
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > jcs-users-unsubscribe@jakarta.apache.org
> > > > > > > > > > > > > > For additional commands,
e-mail:
> > > > > > > > > > jcs-users-help@jakarta.apache.org
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > jcs-users-unsubscribe@jakarta.apache.org
> > > > > > > > > > > > > For additional commands,
e-mail:
> > > > > > > > > > jcs-users-help@jakarta.apache.org
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > jcs-users-unsubscribe@jakarta.apache.org
> > > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > jcs-users-help@jakarta.apache.org
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > > > > jcs-users-unsubscribe@jakarta.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > jcs-users-help@jakarta.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > jcs-users-unsubscribe@jakarta.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > > > > jcs-users-help@jakarta.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > > > > jcs-users-unsubscribe@jakarta.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > > jcs-users-help@jakarta.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > > jcs-users-unsubscribe@jakarta.apache.org
> > > > > > > > For additional commands, e-mail:
> > > > > jcs-users-help@jakarta.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > > jcs-users-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> > > jcs-users-help@jakarta.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message