jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <asm...@yahoo.com>
Subject Re: jcs.get() returns null
Date Fri, 27 Jul 2007 16:31:55 GMT
You haven't sent enough details.  You should probably
set the purgatory size higher.

jcs.auxiliary.DCCn2urCache.attributes.MaxPurgatorySize=100




--- Al Forbes <forbes.al@googlemail.com> wrote:

> MaxObjects=100
> 
> Try changing MaxObjects and see what happens. The
> software does work -
> if in doubt try any of the unit tests in subversion.
> 
> Regards
> Al
> 
> 
> On 26/07/07, Johann Blauensteiner
> <jblauensteiner@pidas.com> wrote:
> > Hi folks,
> >
> > I'm filling a region with 200.000 Key/Value-pairs
> from a ResultSet:
> > Right after finishing the while-loop, most of the
> objects are gone (e.g.
> > both System.outs return null for existing keys )
> > Whats wrong??
> >
> > --- CODE
> >
>
---------------------------------------------------------------------------------------
> > JCS cache = null;
> > cache = JCS.getInstance("cn2urCache");
> > // GET RESULTSET
> > ...
> >
> > while (rs.next()) {
> >   String customerNumber =
> rs.getString("customernumber");
> >   int userRid = rs.getInt("rid");
> >   cache.put(customerNumber, userRid);
> > }
> > System.out.println(cache.get("10"));
> > System.out.println(cache.get("161300"));
> >
> > --- CODE
> >
>
---------------------------------------------------------------------------------------
> >
> >
> >
>
#########################################################################
> > # DEFAULT CACHE REGION
> >
>
##########################################################################
> > jcs.default=DC
> >
>
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> > jcs.default.cacheattributes.MaxObjects=100
> >
>
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> >
> jcs.default.cacheattributes.UseMemoryShrinker=false
> >
>
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> >
>
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
> >
> >
>
jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
> > jcs.default.elementattributes.IsEternal=true
> > jcs.default.elementattributes.MaxLifeSeconds=-1
> > jcs.default.elementattributes.IdleTime=1800
> > jcs.default.elementattributes.IsSpool=true
> > jcs.default.elementattributes.IsRemote=false
> > jcs.default.elementattributes.IsLateral=false
> >
> >
>
##########################################################################
> > # PRE-DEFINED CACHE REGION
> CustomerNumber2UserRidCache
> >
>
##########################################################################
> > jcs.region.cn2urCache=DCCn2urCache
> >
>
jcs.region.cn2urCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> >
> jcs.region.cn2urCache.cacheattributes.MaxObjects=100
> >
>
jcs.region.cn2urCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> >
>
jcs.region.cn2urCache.cacheattributes.UseMemoryShrinker=false
> >
>
jcs.region.cn2urCache.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> >
>
jcs.region.cn2urCache.cacheattributes.ShrinkerIntervalSeconds=60
> >
>
jcs.region.cn2urCache.cacheattributes.MaxSpoolPerRun=100
> >
> >
>
jcs.region.cn2urCache.elementattributes=org.apache.jcs.engine.ElementAttributes
> >
>
jcs.region.cn2urCache.elementattributes.IsEternal=true
> >
> >
>
##########################################################################
> > # AVAILABLE AUXILIARY CACHES
> DCCustomerNumber2UserRidCache
> >
>
##########################################################################
> >
>
jcs.auxiliary.DCCn2urCache=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
> >
>
jcs.auxiliary.DCCn2urCache.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
> >
>
jcs.auxiliary.DCCn2urCache.attributes.DiskPath=c:/temp/jcs_swap/DCCustomerNumber2UserRidCache
> >
>
jcs.auxiliary.DCCn2urCache.attributes.MaxPurgatorySize=100
> >
>
jcs.auxiliary.DCCn2urCache.attributes.MaxKeySize=200000
> >
>
jcs.auxiliary.DCCn2urCache.attributes.MaxRecycleBinSize=100
> >
>
jcs.auxiliary.DCCn2urCache.attributes.OptimizeAtRemoveCount=300000
> >
>
jcs.auxiliary.DCCn2urCache.attributes.ShutdownSpoolTimeLimit=60
> >
> > Thanks !
> > Johann
> >
> >
> 
>
---------------------------------------------------------------------
> 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