jakarta-jcs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Carmichael <to...@concur.com>
Subject Changing behavior of jcs.default.elementattributes
Date Fri, 28 Mar 2003 21:38:12 GMT
I have been debugging and trying to get the lateral cache to work and I have
a documentation bug and implementation question (possibly a bug) that I
would like the team to consider.

1.  In the documentation on how to setup the properties for a lateral cache,
the following string is used to identify the class implementing the lateral
cache:
jcs.auxiliary.LTCP=org.apache.stratum.jcs.auxiliary.lateral.LateralCacheFact
ory
jcs.auxiliary.LTCP.attributes=org.apache.stratum.jcs.auxiliary.lateral.Later
alCacheAttributes

.stratum should be removed.  This applies to all the documentation on the
property files.  

2.  In the property file for the Basic Web example, the cache.ccf file has
entries for element attributes like such:

jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLifeSeconds=3600
jcs.default.elementattributes.IdleTime=1800
jcs.default.elementattributes.IsSpool=true
jcs.default.elementattributes.IsRemote=true
jcs.default.elementattributes.IsLateral=true

Are these intended to be default values for elementattributes all the
regions?  If so, it doesn't work that way.  Each region gets the default
values for element attributes specified by the initialization values for the
property in the ElementAttributesClass.  It could work that way if the
method parseElementAttributes in the class
org.apache.jcs.engine.control.CompositeCacheConfigurator was changed to be
the following:

    protected IElementAttributes
        parseElementAttributes( Properties props,
                                String regName,
                                String regionPrefix )
    {
        IElementAttributes eAttr;

        String attrName = regionPrefix + regName +
this.ELEMENT_ATTRIBUTE_PREFIX;

        // auxFactory was not previously initialized.
        //String prefix = regionPrefix + regName + ATTRIBUTE_PREFIX;
        IElementAttributes eAttr2 = ccMgr.getDefaultElementAttributes();
        eAttr = eAttr2.copy();

        PropertySetter.setProperties( eAttr, props, attrName + "." );

Then, each region would get default values and could override defaults by
specifying a new value in their region.  

Consider the above a patch if someone wants it.  

Todd

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message