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: [bayes][heur][faked-from] Re: Help for cache.ccf file
Date Thu, 09 Nov 2006 06:04:35 GMT
cacheKey related file .key extension file is showing 0KB is there any
problem with caching,bcoz when i'm getting data for that it is
returning null object.

Thanks&Regards
Sambasiva Reddy
CTS

On 11/9/06, Sambasiva Reddy <sambasivareddy.s@gmail.com> wrote:
> 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 <djacobs@esurg.com> 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:sambasivareddy.s@gmail.com]
> > 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 <asmuts@yahoo.com> wrote:
> > > Read the docs.  JCS can persist.  Stop asking such
> > > basic questions that are covered in the documentation.
> > >
> > > --- Sambasiva Reddy <sambasivareddy.s@gmail.com>
> > > wrote:
> > >
> > > > but one more doubt is if that is not persisted, what
> > > > is the use of JCS????
> > > >
> > > >
> > > > On 11/8/06, Ard Schrijvers <a.schrijvers@hippo.nl>
> > > > 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
> > > > <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
> > > >
> > > === message truncated ===
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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