You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by Aaron Smuts <aa...@wisc.edu> on 2004/04/15 21:46:44 UTC

xml config

Does someone have a good xml configuration addition for JCS?


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


Re: xml config

Posted by Scott Eade <se...@backstagetech.com.au>.
Aaron Smuts wrote:

>Does someone have a good xml configuration addition for JCS?
>  
>
Check out commons-configuration.

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au


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


RE: xml config prototype

Posted by Aaron Smuts <aa...@wisc.edu>.
Yes, that does look nice and clear.  Good idea. 

I'm not sure what Digester can do, people seem to like it, but it is not
exactly the simplest thing to use.

Thanks,

Aaron

> -----Original Message-----
> From: James Taylor [mailto:james@jamestaylor.org]
> Sent: Monday, April 19, 2004 6:00 AM
> To: Turbine JCS Users List
> Subject: Re: xml config prototype
> 
> > The problem is mainly with the auxiliaries.  A new auxiliary can
have
> > all sorts of parameters unique to itself.  A memory plugin could
have
> > some configuration parameters that are also unique.
> 
> Might want to look at xstream (xstream.codehaus.org), I think it
> handles this case better than digester (and it seems much simpler to
> use).
> 
> -- jt
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
turbine-jcs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
turbine-jcs-user-help@jakarta.apache.org


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


RE: xml config prototype

Posted by Aaron Smuts <aa...@wisc.edu>.
I'm trying not to use anything 1.4 specific.  This is new, right?  It
looks interesting though.

Thanks,

Aaron

> -----Original Message-----
> From: Hanson Char [mailto:hanson_char@yahoo.com]
> Sent: Monday, April 19, 2004 9:09 AM
> To: 'Turbine JCS Users List'
> Subject: RE: xml config prototype
> 
> How about the the XML{En,De}coder from package java.beans from JDK1.4+
?
> It
> also happens to be one of James Gosling's favorite APIs
> (http://today.java.net/jag/page4.html)
> 
> -----Original Message-----
> From: James Taylor [mailto:james@jamestaylor.org]
> Sent: Monday, 19 April 2004 9:00 PM
> To: Turbine JCS Users List
> Subject: Re: xml config prototype
> 


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


RE: xml config prototype

Posted by Hanson Char <ha...@yahoo.com>.
How about the the XML{En,De}coder from package java.beans from JDK1.4+ ? It
also happens to be one of James Gosling's favorite APIs
(http://today.java.net/jag/page4.html)

-----Original Message-----
From: James Taylor [mailto:james@jamestaylor.org]
Sent: Monday, 19 April 2004 9:00 PM
To: Turbine JCS Users List
Subject: Re: xml config prototype


> The problem is mainly with the auxiliaries.  A new auxiliary can have >
all sorts of parameters unique to itself.  A memory plugin could have > some
configuration parameters that are also unique.  Might want to look at
xstream (xstream.codehaus.org), I think it  handles this case better than
digester (and it seems much simpler to  use).  --
   --------------------------------------------------------------------- To
unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org For
additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org


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


RE: xml config prototype

Posted by Hanson Char <ha...@yahoo.com>.
If I remeber correctly, you can write in jdk1.4 and then let the user to
compile the byte code to be 1.3 compatible if needed.  Some javac option
like:  -source 1.4 -target 1.3.

Hanson

-----Original Message-----
From: Aaron Smuts [mailto:aasmuts@wisc.edu]
Sent: Tuesday, 20 April 2004 1:27 AM
To: 'Turbine JCS Users List'
Subject: RE: xml config prototype


Xstream says it requires 1.4.  This is getting to be a problem.  Aaron
 > -----Original Message----- > From: James Taylor
[mailto:james@jamestaylor.org] > Sent: Monday, April 19, 2004 6:00 AM > To:
Turbine JCS Users List > Subject: Re: xml config prototype >  > > The
problem is mainly with the auxiliaries.  A new auxiliary can have > > all
sorts of parameters unique to itself.  A memory plugin could have > > some
configuration parameters that are also unique. >  > Might want to look at
xstream (xstream.codehaus.org), I think it > handles this case better than
digester (and it seems much simpler to > use). >  > -- jt >  >
 > --------------------------------------------------------------------- >
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org >
For additional commands, e-mail:
rbine-jcs-user-help@jakarta.apache.org   -----------------------------------
---------------------------------- To unsubscribe, e-mail:
turbine-jcs-user-unsubscribe@jakarta.apache.org For additional commands,
e-mail: turbine-jcs-user-help@jakarta.apache.org


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


RE: xml config prototype

Posted by Aaron Smuts <aa...@wisc.edu>.
Xstream says it requires 1.4.

This is getting to be a problem.

Aaron

> -----Original Message-----
> From: James Taylor [mailto:james@jamestaylor.org]
> Sent: Monday, April 19, 2004 6:00 AM
> To: Turbine JCS Users List
> Subject: Re: xml config prototype
> 
> > The problem is mainly with the auxiliaries.  A new auxiliary can
have
> > all sorts of parameters unique to itself.  A memory plugin could
have
> > some configuration parameters that are also unique.
> 
> Might want to look at xstream (xstream.codehaus.org), I think it
> handles this case better than digester (and it seems much simpler to
> use).
> 
> -- jt
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
turbine-jcs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
turbine-jcs-user-help@jakarta.apache.org


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


Re: xml config prototype

Posted by James Taylor <ja...@jamestaylor.org>.
> The problem is mainly with the auxiliaries.  A new auxiliary can have
> all sorts of parameters unique to itself.  A memory plugin could have
> some configuration parameters that are also unique.

Might want to look at xstream (xstream.codehaus.org), I think it 
handles this case better than digester (and it seems much simpler to 
use).

-- jt


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


RE: xml config prototype

Posted by Daniel Rosenbaum <dr...@yahoo.com>.
If I recall correctly, each aux is only configured once, then
each region can reference it.  Is this is the case, perhaps it
would be acceptable for the auxiliaries to be configured with
the set-property tags, but the regions themselves could be
configured with attributes.

In addition, say a region does need additional unique
parameters, a set-property could then be added as needed as an
inner tag to the region.  But at least the standard params could
be configured more simply as simple attributes.  

Daniel


--- Aaron Smuts <aa...@wisc.edu> wrote:
> Hi Daniel,
> 
> The problem is mainly with the auxiliaries.  A new auxiliary
> can have
> all sorts of parameters unique to itself.  A memory plugin
> could have
> some configuration parameters that are also unique.
> 
> Something closer to what you suggest might be better for part
> of the
> region specification.
> 
> Aaron
> 
> > -----Original Message-----
> > From: Daniel Rosenbaum [mailto:drosenbaum@yahoo.com]
> > Sent: Sunday, April 18, 2004 5:38 PM
> > To: Turbine JCS Users List
> > Subject: Re: xml config prototype
> > 
> > Eeek wow that is some pretty ugly XML.  Are all the
> > set-properties really needed?  How about having one tag with
> a
> > bunch of attributes?  For example:
> > 
> > <region name="example"
> > classname="org.apache.jcs.engine.CompositeCacheAttributes"
> > maxObjects="10">
> > 
> > etc.  Along with some inner tags if nec.
> > 
> > The other way is very verbose.
> > 
> > Perhaps use JAXP to map the XML to java classes as well.
> > 
> > Daniel
> > 
> > --- Aaron Smuts <aa...@wisc.edu> wrote:
> > > I'm working using Digester to configure JCS using xml.  
> I've
> > > pasted a
> > > very rough prototype of a jcs.xml configuration file
> below.
> > > I'm hoping
> > > that someone will have some suggestions on how to improve
> it
> > > or
> > > completely redo it.  I tend to make ugly xml.  Any ideas
> would
> > > be
> > > appreciated.
> > >
> > > If we get a basic format, I'll just have the cachemanager
> call
> > > a
> > > different configuration class if the file ends in .xml. 
> This
> > > should
> > > keep it backward compatible.
> > >
> > > This file does not include the remote server configuration
> > > yet.
> > >
> > > Aaron
> > >
> > >
> > >
> >
>
------------------------------------------------------------------------
> > > ---
> > > <?xml version="1.0" encoding="ISO-8859-1"?>
> > >
> > > <!--
> > > This is the JCS configuration file.
> > >
> > > There are two sections to this file.
> > >
> > > 1. Regions -- This section identifies what regions will be
> > > preconfigured.
> > > Any regions created at runtime will adopt the default
> > > configuration.
> > >
> > > Default -- This attribute identifies a default
> configuration.
> > >
> > > Regions that are not specified in this file will adopt the
> > > default
> > > settings.
> > > The default configuration specifies what auxiliaries to
> use,
> > > the
> > > default region settings (or cacheattributes), and the
> default
> > > element
> > > settings (or element attributes).
> > > One default is necessary, and only one is allowed.
> > >
> > > System -- This attribute identifies the region by which
> the
> > > system will
> > > handle groups.
> > > One groupid is necessary, and only one is allowed.
> > >
> > >
> > > 2. Auxiliaries -- This section defines the auxiliaries
> > > available.
> > > If a region definition or the default configuration
> references
> > > an
> > > auxiliary, it must be included in this section. 
> Auxiliaries
> > > not
> > > referenced in the
> > > region or default configuration sections are ignored.
> > > Memory managers can be plugged in and are often called
> > > auxiliaries, but
> > > they cannot be defined in this section.  Memory managers
> must
> > > be defined
> > > in the region or default configuration sections.
> > >
> > > -->
> > >
> > > <jcs>
> > >
> > >   <regions>
> > >
> > >     <!-- One region, but not more than one, must be marked
> > > default. -->
> > >     <region>
> > > 	<name default="true">example</name>
> > > 	<auxiliary-list>DC<auxiliary-list/>
> > >         <cache-attributes>
> > >   	  <set-property
> > > 	    name="classname"
> > >
> > > value="org.apache.jcs.engine.CompositeCacheAttributes" />
> > > 	  <set-property
> > >             name="MaxObjects"
> > > 	    value="10" />
> > > 	  <set-property
> > >             name="MemoryCacheName"
> > > 	   
> value="org.apache.jcs.engine.memory.lru.LRUMemoryCache"
> > > />
> > > 	  <set-property
> > >             name="UseMemoryShrinker"
> > > 	    value="false" />
> > > 	  <set-property
> > >             name="ShrinkerIntervalSeconds"
> > > 	    value="30" />
> > > 	  <set-property
> > >             name="MaxMemoryIdleTimeSeconds"
> > > 	    value="3600000000" />
> > >         </cache-attributes>
> > >         <element-attributes>
> > >   	  <set-property
> > >  	    name="classname"
> > > value="org.apache.jcs.engine.ElementAttributes" />
> > > 	  <set-property
> > >             name="IsEternal"
> > > 	    value="true" />
> > > 	  <set-property
> > >             name="MaxLifeSeconds"
> > > 	    value="30" />
> > > 	  <set-property
> > >             name="IsSpool"
> > > 	    value="true" />
> > > 	  <set-property
> > >             name="IsRemote"
> > > 	    value="true" />
> > > 	  <set-property
> > >             name="IsLateral"
> > > 	    value="true" />
> > >         </element-attributes>
> > >     </region>
> > >
> > >
> > >     <!-- One region, but not more than one, must be marked
> > > groupid. -->
> > >     <region>
> > > 	<name groupid="true">system-group-id</name>
> > > 	<auxiliary-list>DC<auxiliary-list/>
> > >         <cache-attributes>
> > >   	  <set-property
> > > 	    name="classname"
> > >
> > > value="org.apache.jcs.engine.CompositeCacheAttributes" />
> > > 	  <set-property
> > >             name="MaxObjects"
> > > 	    value="10" />
> > > 	  <set-property
> > >             name="MemoryCacheName"
> > > 	   
> value="org.apache.jcs.engine.memory.lru.LRUMemoryCache"
> > > />
> > > 	  <set-property
> > >             name="UseMemoryShrinker"
> > > 	    value="false" />
> > > 	  <set-property
> > >             name="ShrinkerIntervalSeconds"
> > > 	    value="30" />
> > > 	  <set-property
> > >             name="MaxMemoryIdleTimeSeconds"
> > > 	    value="3600000000" />
> > >         </cache-attributes>
> > >         <element-attributes>
> > >   	  <set-property
> > >  	    name="classname"
> > > value="org.apache.jcs.engine.ElementAttributes" />
> > > 	  <set-property
> > >             name="IsEternal"
> > > 	    value="true" />
> > > 	  <set-property
> > >             name="MaxLifeSeconds"
> > > 	    value="30" />
> > > 	  <set-property
> > >             name="IsSpool"
> > > 	    value="true" />
> > > 	  <set-property
> > >             name="IsRemote"
> > > 	    value="true" />
> > > 	  <set-property
> > >             name="IsLateral"
> > > 	    value="true" />
> > >         </element-attributes>
> > >     </region>
> > >
> > >
> > >     <!-- Otptional Regions -->
> > >     <region>
> > > 	<name>testCache1</name>
> > > 	<auxiliary-list>DC<auxiliary-list/>
> > >         <cache-attributes>
> > >   	  <set-property
> > > 	    name="classname"
> > >
> > > value="org.apache.jcs.engine.CompositeCacheAttributes" />
> > > 	  <set-property
> > >             name="MaxObjects"
> > > 	    value="10" />
> > > 	  <set-property
> > >             name="MemoryCacheName"
> > > 	   
> value="org.apache.jcs.engine.memory.lru.LRUMemoryCache"
> > > />
> > > 	  <set-property
> > >             name="UseMemoryShrinker"
> > > 	    value="false" />
> > > 	  <set-property
> > >             name="ShrinkerIntervalSeconds"
> > > 	    value="30" />
> > > 	  <set-property
> > >             name="MaxMemoryIdleTimeSeconds"
> > > 	    value="3600000000" />
> > >         </cache-attributes>
> > >         <element-attributes>
> > >   	  <set-property
> > >  	    name="classname"
> > > value="org.apache.jcs.engine.ElementAttributes" />
> > > 	  <set-property
> > >             name="IsEternal"
> > > 	    value="true" />
> > > 	  <set-property
> > >             name="MaxLifeSeconds"
> > > 	    value="30" />
> > > 	  <set-property
> > >             name="IsSpool"
> > > 	    value="true" />
> > > 	  <set-property
> > >             name="IsRemote"
> > > 	    value="true" />
> > > 	  <set-property
> > >             name="IsLateral"
> > > 	    value="true" />
> > >         </element-attributes>
> > >     </region>
> > >
> > >   </regions>
> > >
> > >
> > >
> > >   <!-- Auxiliary COnfiguration -->
> > >
> > >   <auxiliaries>
> > >
> > >     <!-- Remote RMI cache without failover -->
> > >     <auxiliary>
> > >         <name>RGroup</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > > value="org.apache.jcs.auxiliary.remote.RemoteCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.remote.RemoteCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="RemoteTypeName"
> > > 	    value="LOCAL" />
> > > 	  <set-property
> > >             name="RemoteHost"
> > > 	    value="localhost" />
> > > 	  <set-property
> > >             name="RemotePort"
> > > 	    value="1102" />
> > > 	  <set-property
> > >             name="GetOnly"
> > > 	    value="true" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >     <!-- Remote RMI cache with failover -->
> > >     <auxiliary>
> > >         <name>RFailover</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > > value="org.apache.jcs.auxiliary.remote.RemoteCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.remote.RemoteCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="RemoteTypeName"
> > > 	    value="LOCAL" />
> > > 	  <set-property
> > >             name="FailoverServers"
> > > 	    value="localhost:1102" />
> > > 	  <set-property
> > >             name="GetOnly"
> > > 	    value="false" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >
> > >   <!-- Primary Disk Cache -->
> > >     <auxiliary>
> > >         <name>DC</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > >
> >
>
value="org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> >
>
value="org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="DiskPath"
> > > 	    value="i:\\dev\\raf" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >   <!-- HSQL Disk Cache -- too slow -->
> > >     <auxiliary>
> > >         <name>HDC</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.disk.hsql.HSQLCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.disk.hsql.HSQLCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="DiskPath"
> > > 	    value="i:\\dev\\hsql" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >   <!-- JISP Disk Cache -- save memory with disk key
> storage
> > > -->
> > >     <auxiliary>
> > >         <name>HDC</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.disk.jisp.JISPCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.disk.jisp.JISPCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="DiskPath"
> > > 	    value="i:\\dev\\jisp" />
> > > 	  <set-property
> > >             name="ClearOnStart"
> > > 	    value="false" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >   <!-- Unreliable Lateral -->
> > >     <auxiliary>
> > >         <name>LUDP</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> >
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="TransmissionTypeName"
> > > 	    value="UDP" />
> > > 	  <set-property
> > >             name="UdpMulticastAddr"
> > > 	    value="228.5.6.7" />
> > > 	  <set-property
> > >             name="UdpMulticastPort"
> > > 	    value="6789" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >   <!-- JavaGroups Lateral -->
> > >     <auxiliary>
> > >         <name>LJG</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> >
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="TransmissionTypeName"
> > > 	    value="JAVAGROUPS" />
> > > 	  <set-property
> > >             name="UdpMulticastAddr"
> > > 	    value="228.5.6.7" />
> > > 	  <set-property
> > >             name="UdpMulticastPort"
> > > 	    value="6789" />
> > > 	  <set-property
> > >             name="PutOnlyMode"
> > > 	    value="false" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >   <!-- Reliable, fast TCP Lateral -->
> > >     <auxiliary>
> > >         <name>LTCP</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> >
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="TransmissionTypeName"
> > > 	    value="TCP" />
> > > 	  <set-property
> > >             name="TcpServers"
> > > 	    value="localhost:1111,localhost2:1112" />
> > > 	  <set-property
> > >             name="TcpListenerPort"
> > > 	    value="1111" />
> > > 	  <set-property
> > >             name="PutOnlyMode"
> > > 	    value="true" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >   <!-- XMLRPC Lateral -->
> > >     <auxiliary>
> > >         <name>LTCP</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> >
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="TransmissionTypeName"
> > > 	    value="XMLRPC" />
> > > 	  <set-property
> > >             name="HttpServers"
> > > 	    value="localhost:8182" />
> > > 	  <set-property
> > >             name="HttpListenerPort"
> > > 	    value="8181" />
> > > 	  <set-property
> > >             name="PutOnlyMode"
> > > 	    value="false" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >   <!-- HTTP Lateral -->
> > >     <auxiliary>
> > >         <name>LTCP</name>
> > >         <set-property
> > > 	    name="classname"
> > >
> > >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > > />
> > > 	<auxiliary-attributes>
> > > 	  <set-property
> > >             name="classname"
> > >
> > >
> >
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > > />
> > > 	  <set-property
> > >             name="TransmissionTypeName"
> > > 	    value="HTTP" />
> > > 	  <set-property
> > >             name="HttpServers"
> > > 	    value="localhost:8080,localhost:7001,localhost:80" />
> > > 	  <set-property
> > >             name="httpReceiveServlet"
> > > 	    value="/cache/LateralCacheReceiverServlet" />
> > > 	  <set-property
> > >             name="httpDeleteServlet"
> > > 	    value="/cache/DeleteCacheServlet" />
> > > 	</auxiliary-attributes>
> > >    </auxiliary>
> > >
> > >
> > >   <auxiliaries/>
> > >
> > > </jcs>
> > >
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > turbine-jcs-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > turbine-jcs-user-help@jakarta.apache.org
> > >
> > 
> > 
> > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Photos: High-quality 4x6 digital prints for 25�
> > http://photos.yahoo.com/ph/print_splash
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> turbine-jcs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> turbine-jcs-user-help@jakarta.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> turbine-jcs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> turbine-jcs-user-help@jakarta.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash

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


RE: xml config prototype

Posted by Aaron Smuts <aa...@wisc.edu>.
Hi Daniel,

The problem is mainly with the auxiliaries.  A new auxiliary can have
all sorts of parameters unique to itself.  A memory plugin could have
some configuration parameters that are also unique.

Something closer to what you suggest might be better for part of the
region specification.

Aaron

> -----Original Message-----
> From: Daniel Rosenbaum [mailto:drosenbaum@yahoo.com]
> Sent: Sunday, April 18, 2004 5:38 PM
> To: Turbine JCS Users List
> Subject: Re: xml config prototype
> 
> Eeek wow that is some pretty ugly XML.  Are all the
> set-properties really needed?  How about having one tag with a
> bunch of attributes?  For example:
> 
> <region name="example"
> classname="org.apache.jcs.engine.CompositeCacheAttributes"
> maxObjects="10">
> 
> etc.  Along with some inner tags if nec.
> 
> The other way is very verbose.
> 
> Perhaps use JAXP to map the XML to java classes as well.
> 
> Daniel
> 
> --- Aaron Smuts <aa...@wisc.edu> wrote:
> > I'm working using Digester to configure JCS using xml.   I've
> > pasted a
> > very rough prototype of a jcs.xml configuration file below.
> > I'm hoping
> > that someone will have some suggestions on how to improve it
> > or
> > completely redo it.  I tend to make ugly xml.  Any ideas would
> > be
> > appreciated.
> >
> > If we get a basic format, I'll just have the cachemanager call
> > a
> > different configuration class if the file ends in .xml.  This
> > should
> > keep it backward compatible.
> >
> > This file does not include the remote server configuration
> > yet.
> >
> > Aaron
> >
> >
> >
>
------------------------------------------------------------------------
> > ---
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <!--
> > This is the JCS configuration file.
> >
> > There are two sections to this file.
> >
> > 1. Regions -- This section identifies what regions will be
> > preconfigured.
> > Any regions created at runtime will adopt the default
> > configuration.
> >
> > Default -- This attribute identifies a default configuration.
> >
> > Regions that are not specified in this file will adopt the
> > default
> > settings.
> > The default configuration specifies what auxiliaries to use,
> > the
> > default region settings (or cacheattributes), and the default
> > element
> > settings (or element attributes).
> > One default is necessary, and only one is allowed.
> >
> > System -- This attribute identifies the region by which the
> > system will
> > handle groups.
> > One groupid is necessary, and only one is allowed.
> >
> >
> > 2. Auxiliaries -- This section defines the auxiliaries
> > available.
> > If a region definition or the default configuration references
> > an
> > auxiliary, it must be included in this section.  Auxiliaries
> > not
> > referenced in the
> > region or default configuration sections are ignored.
> > Memory managers can be plugged in and are often called
> > auxiliaries, but
> > they cannot be defined in this section.  Memory managers must
> > be defined
> > in the region or default configuration sections.
> >
> > -->
> >
> > <jcs>
> >
> >   <regions>
> >
> >     <!-- One region, but not more than one, must be marked
> > default. -->
> >     <region>
> > 	<name default="true">example</name>
> > 	<auxiliary-list>DC<auxiliary-list/>
> >         <cache-attributes>
> >   	  <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.engine.CompositeCacheAttributes" />
> > 	  <set-property
> >             name="MaxObjects"
> > 	    value="10" />
> > 	  <set-property
> >             name="MemoryCacheName"
> > 	    value="org.apache.jcs.engine.memory.lru.LRUMemoryCache"
> > />
> > 	  <set-property
> >             name="UseMemoryShrinker"
> > 	    value="false" />
> > 	  <set-property
> >             name="ShrinkerIntervalSeconds"
> > 	    value="30" />
> > 	  <set-property
> >             name="MaxMemoryIdleTimeSeconds"
> > 	    value="3600000000" />
> >         </cache-attributes>
> >         <element-attributes>
> >   	  <set-property
> >  	    name="classname"
> > value="org.apache.jcs.engine.ElementAttributes" />
> > 	  <set-property
> >             name="IsEternal"
> > 	    value="true" />
> > 	  <set-property
> >             name="MaxLifeSeconds"
> > 	    value="30" />
> > 	  <set-property
> >             name="IsSpool"
> > 	    value="true" />
> > 	  <set-property
> >             name="IsRemote"
> > 	    value="true" />
> > 	  <set-property
> >             name="IsLateral"
> > 	    value="true" />
> >         </element-attributes>
> >     </region>
> >
> >
> >     <!-- One region, but not more than one, must be marked
> > groupid. -->
> >     <region>
> > 	<name groupid="true">system-group-id</name>
> > 	<auxiliary-list>DC<auxiliary-list/>
> >         <cache-attributes>
> >   	  <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.engine.CompositeCacheAttributes" />
> > 	  <set-property
> >             name="MaxObjects"
> > 	    value="10" />
> > 	  <set-property
> >             name="MemoryCacheName"
> > 	    value="org.apache.jcs.engine.memory.lru.LRUMemoryCache"
> > />
> > 	  <set-property
> >             name="UseMemoryShrinker"
> > 	    value="false" />
> > 	  <set-property
> >             name="ShrinkerIntervalSeconds"
> > 	    value="30" />
> > 	  <set-property
> >             name="MaxMemoryIdleTimeSeconds"
> > 	    value="3600000000" />
> >         </cache-attributes>
> >         <element-attributes>
> >   	  <set-property
> >  	    name="classname"
> > value="org.apache.jcs.engine.ElementAttributes" />
> > 	  <set-property
> >             name="IsEternal"
> > 	    value="true" />
> > 	  <set-property
> >             name="MaxLifeSeconds"
> > 	    value="30" />
> > 	  <set-property
> >             name="IsSpool"
> > 	    value="true" />
> > 	  <set-property
> >             name="IsRemote"
> > 	    value="true" />
> > 	  <set-property
> >             name="IsLateral"
> > 	    value="true" />
> >         </element-attributes>
> >     </region>
> >
> >
> >     <!-- Otptional Regions -->
> >     <region>
> > 	<name>testCache1</name>
> > 	<auxiliary-list>DC<auxiliary-list/>
> >         <cache-attributes>
> >   	  <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.engine.CompositeCacheAttributes" />
> > 	  <set-property
> >             name="MaxObjects"
> > 	    value="10" />
> > 	  <set-property
> >             name="MemoryCacheName"
> > 	    value="org.apache.jcs.engine.memory.lru.LRUMemoryCache"
> > />
> > 	  <set-property
> >             name="UseMemoryShrinker"
> > 	    value="false" />
> > 	  <set-property
> >             name="ShrinkerIntervalSeconds"
> > 	    value="30" />
> > 	  <set-property
> >             name="MaxMemoryIdleTimeSeconds"
> > 	    value="3600000000" />
> >         </cache-attributes>
> >         <element-attributes>
> >   	  <set-property
> >  	    name="classname"
> > value="org.apache.jcs.engine.ElementAttributes" />
> > 	  <set-property
> >             name="IsEternal"
> > 	    value="true" />
> > 	  <set-property
> >             name="MaxLifeSeconds"
> > 	    value="30" />
> > 	  <set-property
> >             name="IsSpool"
> > 	    value="true" />
> > 	  <set-property
> >             name="IsRemote"
> > 	    value="true" />
> > 	  <set-property
> >             name="IsLateral"
> > 	    value="true" />
> >         </element-attributes>
> >     </region>
> >
> >   </regions>
> >
> >
> >
> >   <!-- Auxiliary COnfiguration -->
> >
> >   <auxiliaries>
> >
> >     <!-- Remote RMI cache without failover -->
> >     <auxiliary>
> >         <name>RGroup</name>
> >         <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.auxiliary.remote.RemoteCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> > value="org.apache.jcs.auxiliary.remote.RemoteCacheAttributes"
> > />
> > 	  <set-property
> >             name="RemoteTypeName"
> > 	    value="LOCAL" />
> > 	  <set-property
> >             name="RemoteHost"
> > 	    value="localhost" />
> > 	  <set-property
> >             name="RemotePort"
> > 	    value="1102" />
> > 	  <set-property
> >             name="GetOnly"
> > 	    value="true" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >     <!-- Remote RMI cache with failover -->
> >     <auxiliary>
> >         <name>RFailover</name>
> >         <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.auxiliary.remote.RemoteCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> > value="org.apache.jcs.auxiliary.remote.RemoteCacheAttributes"
> > />
> > 	  <set-property
> >             name="RemoteTypeName"
> > 	    value="LOCAL" />
> > 	  <set-property
> >             name="FailoverServers"
> > 	    value="localhost:1102" />
> > 	  <set-property
> >             name="GetOnly"
> > 	    value="false" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >
> >   <!-- Primary Disk Cache -->
> >     <auxiliary>
> >         <name>DC</name>
> >         <set-property
> > 	    name="classname"
> >
> >
> value="org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> >
>
value="org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes"
> > />
> > 	  <set-property
> >             name="DiskPath"
> > 	    value="i:\\dev\\raf" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >   <!-- HSQL Disk Cache -- too slow -->
> >     <auxiliary>
> >         <name>HDC</name>
> >         <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.auxiliary.disk.hsql.HSQLCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> > value="org.apache.jcs.auxiliary.disk.hsql.HSQLCacheAttributes"
> > />
> > 	  <set-property
> >             name="DiskPath"
> > 	    value="i:\\dev\\hsql" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >   <!-- JISP Disk Cache -- save memory with disk key storage
> > -->
> >     <auxiliary>
> >         <name>HDC</name>
> >         <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.auxiliary.disk.jisp.JISPCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> > value="org.apache.jcs.auxiliary.disk.jisp.JISPCacheAttributes"
> > />
> > 	  <set-property
> >             name="DiskPath"
> > 	    value="i:\\dev\\jisp" />
> > 	  <set-property
> >             name="ClearOnStart"
> > 	    value="false" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >   <!-- Unreliable Lateral -->
> >     <auxiliary>
> >         <name>LUDP</name>
> >         <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > />
> > 	  <set-property
> >             name="TransmissionTypeName"
> > 	    value="UDP" />
> > 	  <set-property
> >             name="UdpMulticastAddr"
> > 	    value="228.5.6.7" />
> > 	  <set-property
> >             name="UdpMulticastPort"
> > 	    value="6789" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >   <!-- JavaGroups Lateral -->
> >     <auxiliary>
> >         <name>LJG</name>
> >         <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > />
> > 	  <set-property
> >             name="TransmissionTypeName"
> > 	    value="JAVAGROUPS" />
> > 	  <set-property
> >             name="UdpMulticastAddr"
> > 	    value="228.5.6.7" />
> > 	  <set-property
> >             name="UdpMulticastPort"
> > 	    value="6789" />
> > 	  <set-property
> >             name="PutOnlyMode"
> > 	    value="false" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >   <!-- Reliable, fast TCP Lateral -->
> >     <auxiliary>
> >         <name>LTCP</name>
> >         <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > />
> > 	  <set-property
> >             name="TransmissionTypeName"
> > 	    value="TCP" />
> > 	  <set-property
> >             name="TcpServers"
> > 	    value="localhost:1111,localhost2:1112" />
> > 	  <set-property
> >             name="TcpListenerPort"
> > 	    value="1111" />
> > 	  <set-property
> >             name="PutOnlyMode"
> > 	    value="true" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >   <!-- XMLRPC Lateral -->
> >     <auxiliary>
> >         <name>LTCP</name>
> >         <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > />
> > 	  <set-property
> >             name="TransmissionTypeName"
> > 	    value="XMLRPC" />
> > 	  <set-property
> >             name="HttpServers"
> > 	    value="localhost:8182" />
> > 	  <set-property
> >             name="HttpListenerPort"
> > 	    value="8181" />
> > 	  <set-property
> >             name="PutOnlyMode"
> > 	    value="false" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >   <!-- HTTP Lateral -->
> >     <auxiliary>
> >         <name>LTCP</name>
> >         <set-property
> > 	    name="classname"
> >
> > value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> > />
> > 	<auxiliary-attributes>
> > 	  <set-property
> >             name="classname"
> >
> >
> value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> > />
> > 	  <set-property
> >             name="TransmissionTypeName"
> > 	    value="HTTP" />
> > 	  <set-property
> >             name="HttpServers"
> > 	    value="localhost:8080,localhost:7001,localhost:80" />
> > 	  <set-property
> >             name="httpReceiveServlet"
> > 	    value="/cache/LateralCacheReceiverServlet" />
> > 	  <set-property
> >             name="httpDeleteServlet"
> > 	    value="/cache/DeleteCacheServlet" />
> > 	</auxiliary-attributes>
> >    </auxiliary>
> >
> >
> >   <auxiliaries/>
> >
> > </jcs>
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > turbine-jcs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > turbine-jcs-user-help@jakarta.apache.org
> >
> 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25¢
> http://photos.yahoo.com/ph/print_splash
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
turbine-jcs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
turbine-jcs-user-help@jakarta.apache.org


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


Re: xml config prototype

Posted by Daniel Rosenbaum <dr...@yahoo.com>.
Eeek wow that is some pretty ugly XML.  Are all the
set-properties really needed?  How about having one tag with a
bunch of attributes?  For example:

<region name="example"
classname="org.apache.jcs.engine.CompositeCacheAttributes"
maxObjects="10">

etc.  Along with some inner tags if nec.

The other way is very verbose.

Perhaps use JAXP to map the XML to java classes as well.

Daniel

--- Aaron Smuts <aa...@wisc.edu> wrote:
> I'm working using Digester to configure JCS using xml.   I've
> pasted a
> very rough prototype of a jcs.xml configuration file below. 
> I'm hoping
> that someone will have some suggestions on how to improve it
> or
> completely redo it.  I tend to make ugly xml.  Any ideas would
> be
> appreciated.  
> 
> If we get a basic format, I'll just have the cachemanager call
> a
> different configuration class if the file ends in .xml.  This
> should
> keep it backward compatible.  
> 
> This file does not include the remote server configuration
> yet.
> 
> Aaron
> 
> 
>
------------------------------------------------------------------------
> ---
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <!--
> This is the JCS configuration file.
> 
> There are two sections to this file.
> 
> 1. Regions -- This section identifies what regions will be
> preconfigured.
> Any regions created at runtime will adopt the default
> configuration. 
> 
> Default -- This attribute identifies a default configuration. 
> 
> Regions that are not specified in this file will adopt the
> default
> settings. 
> The default configuration specifies what auxiliaries to use,
> the 
> default region settings (or cacheattributes), and the default
> element 
> settings (or element attributes).
> One default is necessary, and only one is allowed.
> 
> System -- This attribute identifies the region by which the
> system will
> handle groups.  
> One groupid is necessary, and only one is allowed.
> 
> 
> 2. Auxiliaries -- This section defines the auxiliaries
> available.  
> If a region definition or the default configuration references
> an
> auxiliary, it must be included in this section.  Auxiliaries
> not
> referenced in the 
> region or default configuration sections are ignored.
> Memory managers can be plugged in and are often called
> auxiliaries, but 
> they cannot be defined in this section.  Memory managers must
> be defined
> in the region or default configuration sections.
> 
> -->
> 
> <jcs>
> 
>   <regions>
> 
>     <!-- One region, but not more than one, must be marked
> default. -->
>     <region>
> 	<name default="true">example</name>
> 	<auxiliary-list>DC<auxiliary-list/> 
>         <cache-attributes> 
>   	  <set-property 	
> 	    name="classname"
>            
> value="org.apache.jcs.engine.CompositeCacheAttributes" />
> 	  <set-property 
>             name="MaxObjects" 
> 	    value="10" />
> 	  <set-property 
>             name="MemoryCacheName" 
> 	    value="org.apache.jcs.engine.memory.lru.LRUMemoryCache"
> />
> 	  <set-property 
>             name="UseMemoryShrinker" 
> 	    value="false" />
> 	  <set-property 
>             name="ShrinkerIntervalSeconds" 
> 	    value="30" />
> 	  <set-property 
>             name="MaxMemoryIdleTimeSeconds" 
> 	    value="3600000000" />
>         </cache-attributes> 
>         <element-attributes> 
>   	  <set-property 	
>  	    name="classname"
> value="org.apache.jcs.engine.ElementAttributes" />
> 	  <set-property 
>             name="IsEternal" 
> 	    value="true" />
> 	  <set-property 
>             name="MaxLifeSeconds" 
> 	    value="30" />
> 	  <set-property 
>             name="IsSpool" 
> 	    value="true" />
> 	  <set-property 
>             name="IsRemote" 
> 	    value="true" />
> 	  <set-property 
>             name="IsLateral" 
> 	    value="true" />
>         </element-attributes> 
>     </region>
> 
> 
>     <!-- One region, but not more than one, must be marked
> groupid. -->
>     <region>
> 	<name groupid="true">system-group-id</name>
> 	<auxiliary-list>DC<auxiliary-list/> 
>         <cache-attributes> 
>   	  <set-property 	
> 	    name="classname"
>            
> value="org.apache.jcs.engine.CompositeCacheAttributes" />
> 	  <set-property 
>             name="MaxObjects" 
> 	    value="10" />
> 	  <set-property 
>             name="MemoryCacheName" 
> 	    value="org.apache.jcs.engine.memory.lru.LRUMemoryCache"
> />
> 	  <set-property 
>             name="UseMemoryShrinker" 
> 	    value="false" />
> 	  <set-property 
>             name="ShrinkerIntervalSeconds" 
> 	    value="30" />
> 	  <set-property 
>             name="MaxMemoryIdleTimeSeconds" 
> 	    value="3600000000" />
>         </cache-attributes> 
>         <element-attributes> 
>   	  <set-property 	
>  	    name="classname"
> value="org.apache.jcs.engine.ElementAttributes" />
> 	  <set-property 
>             name="IsEternal" 
> 	    value="true" />
> 	  <set-property 
>             name="MaxLifeSeconds" 
> 	    value="30" />
> 	  <set-property 
>             name="IsSpool" 
> 	    value="true" />
> 	  <set-property 
>             name="IsRemote" 
> 	    value="true" />
> 	  <set-property 
>             name="IsLateral" 
> 	    value="true" />
>         </element-attributes> 
>     </region>
> 
> 
>     <!-- Otptional Regions -->
>     <region>
> 	<name>testCache1</name>
> 	<auxiliary-list>DC<auxiliary-list/> 
>         <cache-attributes> 
>   	  <set-property 	
> 	    name="classname"
>            
> value="org.apache.jcs.engine.CompositeCacheAttributes" />
> 	  <set-property 
>             name="MaxObjects" 
> 	    value="10" />
> 	  <set-property 
>             name="MemoryCacheName" 
> 	    value="org.apache.jcs.engine.memory.lru.LRUMemoryCache"
> />
> 	  <set-property 
>             name="UseMemoryShrinker" 
> 	    value="false" />
> 	  <set-property 
>             name="ShrinkerIntervalSeconds" 
> 	    value="30" />
> 	  <set-property 
>             name="MaxMemoryIdleTimeSeconds" 
> 	    value="3600000000" />
>         </cache-attributes> 
>         <element-attributes> 
>   	  <set-property 	
>  	    name="classname"
> value="org.apache.jcs.engine.ElementAttributes" />
> 	  <set-property 
>             name="IsEternal" 
> 	    value="true" />
> 	  <set-property 
>             name="MaxLifeSeconds" 
> 	    value="30" />
> 	  <set-property 
>             name="IsSpool" 
> 	    value="true" />
> 	  <set-property 
>             name="IsRemote" 
> 	    value="true" />
> 	  <set-property 
>             name="IsLateral" 
> 	    value="true" />
>         </element-attributes> 
>     </region>
>  
>   </regions>
> 
> 
> 	
>   <!-- Auxiliary COnfiguration -->
> 
>   <auxiliaries>
> 
>     <!-- Remote RMI cache without failover -->
>     <auxiliary>
>         <name>RGroup</name>
>         <set-property 	
> 	    name="classname"
>            
> value="org.apache.jcs.auxiliary.remote.RemoteCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
> value="org.apache.jcs.auxiliary.remote.RemoteCacheAttributes"
> />
> 	  <set-property 
>             name="RemoteTypeName" 
> 	    value="LOCAL" />
> 	  <set-property 
>             name="RemoteHost" 
> 	    value="localhost" />
> 	  <set-property 
>             name="RemotePort" 
> 	    value="1102" />
> 	  <set-property 
>             name="GetOnly" 
> 	    value="true" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
> 
>     <!-- Remote RMI cache with failover -->
>     <auxiliary>
>         <name>RFailover</name>
>         <set-property 	
> 	    name="classname"
>            
> value="org.apache.jcs.auxiliary.remote.RemoteCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
> value="org.apache.jcs.auxiliary.remote.RemoteCacheAttributes"
> />
> 	  <set-property 
>             name="RemoteTypeName" 
> 	    value="LOCAL" />
> 	  <set-property 
>             name="FailoverServers" 
> 	    value="localhost:1102" />
> 	  <set-property 
>             name="GetOnly" 
> 	    value="false" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
> 
> 
>   <!-- Primary Disk Cache --> 
>     <auxiliary>
>         <name>DC</name>
>         <set-property 	
> 	    name="classname"           	    
>  
>
value="org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
>
value="org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes"
> />
> 	  <set-property 
>             name="DiskPath" 
> 	    value="i:\\dev\\raf" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
> 
>   <!-- HSQL Disk Cache -- too slow --> 
>     <auxiliary>
>         <name>HDC</name>
>         <set-property 	
> 	    name="classname"           	    
>            
> value="org.apache.jcs.auxiliary.disk.hsql.HSQLCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
> value="org.apache.jcs.auxiliary.disk.hsql.HSQLCacheAttributes"
> />
> 	  <set-property 
>             name="DiskPath" 
> 	    value="i:\\dev\\hsql" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
> 
>   <!-- JISP Disk Cache -- save memory with disk key storage
> --> 
>     <auxiliary>
>         <name>HDC</name>
>         <set-property 	
> 	    name="classname"           	    
>            
> value="org.apache.jcs.auxiliary.disk.jisp.JISPCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
> value="org.apache.jcs.auxiliary.disk.jisp.JISPCacheAttributes"
> />
> 	  <set-property 
>             name="DiskPath" 
> 	    value="i:\\dev\\jisp" />
> 	  <set-property 
>             name="ClearOnStart" 
> 	    value="false" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
> 
>   <!-- Unreliable Lateral --> 
>     <auxiliary>
>         <name>LUDP</name>
>         <set-property 	
> 	    name="classname"           	    
>            
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> />
> 	  <set-property 
>             name="TransmissionTypeName" 
> 	    value="UDP" />
> 	  <set-property 
>             name="UdpMulticastAddr" 
> 	    value="228.5.6.7" />
> 	  <set-property 
>             name="UdpMulticastPort" 
> 	    value="6789" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
> 
>   <!-- JavaGroups Lateral --> 
>     <auxiliary>
>         <name>LJG</name>
>         <set-property 	
> 	    name="classname"           	    
>            
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> />
> 	  <set-property 
>             name="TransmissionTypeName" 
> 	    value="JAVAGROUPS" />
> 	  <set-property 
>             name="UdpMulticastAddr" 
> 	    value="228.5.6.7" />
> 	  <set-property 
>             name="UdpMulticastPort" 
> 	    value="6789" />
> 	  <set-property 
>             name="PutOnlyMode" 
> 	    value="false" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
> 
>   <!-- Reliable, fast TCP Lateral --> 
>     <auxiliary>
>         <name>LTCP</name>
>         <set-property 	
> 	    name="classname"           	    
>            
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> />
> 	  <set-property 
>             name="TransmissionTypeName" 
> 	    value="TCP" />
> 	  <set-property 
>             name="TcpServers" 
> 	    value="localhost:1111,localhost2:1112" />
> 	  <set-property 
>             name="TcpListenerPort" 
> 	    value="1111" />
> 	  <set-property 
>             name="PutOnlyMode" 
> 	    value="true" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
>  
>   <!-- XMLRPC Lateral --> 
>     <auxiliary>
>         <name>LTCP</name>
>         <set-property 	
> 	    name="classname"           	    
>            
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> />
> 	  <set-property 
>             name="TransmissionTypeName" 
> 	    value="XMLRPC" />
> 	  <set-property 
>             name="HttpServers" 
> 	    value="localhost:8182" />
> 	  <set-property 
>             name="HttpListenerPort" 
> 	    value="8181" />
> 	  <set-property 
>             name="PutOnlyMode" 
> 	    value="false" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
> 
>   <!-- HTTP Lateral --> 
>     <auxiliary>
>         <name>LTCP</name>
>         <set-property 	
> 	    name="classname"           	    
>            
> value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
> />
> 	<auxiliary-attributes>
> 	  <set-property 
>             name="classname" 
> 	
>
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes"
> />
> 	  <set-property 
>             name="TransmissionTypeName" 
> 	    value="HTTP" />
> 	  <set-property 
>             name="HttpServers" 
> 	    value="localhost:8080,localhost:7001,localhost:80" />
> 	  <set-property 
>             name="httpReceiveServlet" 
> 	    value="/cache/LateralCacheReceiverServlet" />
> 	  <set-property 
>             name="httpDeleteServlet" 
> 	    value="/cache/DeleteCacheServlet" />
> 	</auxiliary-attributes>
>    </auxiliary>
> 
> 
>   <auxiliaries/>
> 
> </jcs>
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> turbine-jcs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> turbine-jcs-user-help@jakarta.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash

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


xml config prototype

Posted by Aaron Smuts <aa...@wisc.edu>.
I'm working using Digester to configure JCS using xml.   I've pasted a
very rough prototype of a jcs.xml configuration file below.  I'm hoping
that someone will have some suggestions on how to improve it or
completely redo it.  I tend to make ugly xml.  Any ideas would be
appreciated.  

If we get a basic format, I'll just have the cachemanager call a
different configuration class if the file ends in .xml.  This should
keep it backward compatible.  

This file does not include the remote server configuration yet.

Aaron


------------------------------------------------------------------------
---
<?xml version="1.0" encoding="ISO-8859-1"?>

<!--
This is the JCS configuration file.

There are two sections to this file.

1. Regions -- This section identifies what regions will be
preconfigured.
Any regions created at runtime will adopt the default configuration. 

Default -- This attribute identifies a default configuration.  
Regions that are not specified in this file will adopt the default
settings. 
The default configuration specifies what auxiliaries to use, the 
default region settings (or cacheattributes), and the default element 
settings (or element attributes).
One default is necessary, and only one is allowed.

System -- This attribute identifies the region by which the system will
handle groups.  
One groupid is necessary, and only one is allowed.


2. Auxiliaries -- This section defines the auxiliaries available.  
If a region definition or the default configuration references an
auxiliary, it must be included in this section.  Auxiliaries not
referenced in the 
region or default configuration sections are ignored.
Memory managers can be plugged in and are often called auxiliaries, but 
they cannot be defined in this section.  Memory managers must be defined
in the region or default configuration sections.

-->

<jcs>

  <regions>

    <!-- One region, but not more than one, must be marked default. -->
    <region>
	<name default="true">example</name>
	<auxiliary-list>DC<auxiliary-list/> 
        <cache-attributes> 
  	  <set-property 	
	    name="classname"
            value="org.apache.jcs.engine.CompositeCacheAttributes" />
	  <set-property 
            name="MaxObjects" 
	    value="10" />
	  <set-property 
            name="MemoryCacheName" 
	    value="org.apache.jcs.engine.memory.lru.LRUMemoryCache" />
	  <set-property 
            name="UseMemoryShrinker" 
	    value="false" />
	  <set-property 
            name="ShrinkerIntervalSeconds" 
	    value="30" />
	  <set-property 
            name="MaxMemoryIdleTimeSeconds" 
	    value="3600000000" />
        </cache-attributes> 
        <element-attributes> 
  	  <set-property 	
 	    name="classname"
value="org.apache.jcs.engine.ElementAttributes" />
	  <set-property 
            name="IsEternal" 
	    value="true" />
	  <set-property 
            name="MaxLifeSeconds" 
	    value="30" />
	  <set-property 
            name="IsSpool" 
	    value="true" />
	  <set-property 
            name="IsRemote" 
	    value="true" />
	  <set-property 
            name="IsLateral" 
	    value="true" />
        </element-attributes> 
    </region>


    <!-- One region, but not more than one, must be marked groupid. -->
    <region>
	<name groupid="true">system-group-id</name>
	<auxiliary-list>DC<auxiliary-list/> 
        <cache-attributes> 
  	  <set-property 	
	    name="classname"
            value="org.apache.jcs.engine.CompositeCacheAttributes" />
	  <set-property 
            name="MaxObjects" 
	    value="10" />
	  <set-property 
            name="MemoryCacheName" 
	    value="org.apache.jcs.engine.memory.lru.LRUMemoryCache" />
	  <set-property 
            name="UseMemoryShrinker" 
	    value="false" />
	  <set-property 
            name="ShrinkerIntervalSeconds" 
	    value="30" />
	  <set-property 
            name="MaxMemoryIdleTimeSeconds" 
	    value="3600000000" />
        </cache-attributes> 
        <element-attributes> 
  	  <set-property 	
 	    name="classname"
value="org.apache.jcs.engine.ElementAttributes" />
	  <set-property 
            name="IsEternal" 
	    value="true" />
	  <set-property 
            name="MaxLifeSeconds" 
	    value="30" />
	  <set-property 
            name="IsSpool" 
	    value="true" />
	  <set-property 
            name="IsRemote" 
	    value="true" />
	  <set-property 
            name="IsLateral" 
	    value="true" />
        </element-attributes> 
    </region>


    <!-- Otptional Regions -->
    <region>
	<name>testCache1</name>
	<auxiliary-list>DC<auxiliary-list/> 
        <cache-attributes> 
  	  <set-property 	
	    name="classname"
            value="org.apache.jcs.engine.CompositeCacheAttributes" />
	  <set-property 
            name="MaxObjects" 
	    value="10" />
	  <set-property 
            name="MemoryCacheName" 
	    value="org.apache.jcs.engine.memory.lru.LRUMemoryCache" />
	  <set-property 
            name="UseMemoryShrinker" 
	    value="false" />
	  <set-property 
            name="ShrinkerIntervalSeconds" 
	    value="30" />
	  <set-property 
            name="MaxMemoryIdleTimeSeconds" 
	    value="3600000000" />
        </cache-attributes> 
        <element-attributes> 
  	  <set-property 	
 	    name="classname"
value="org.apache.jcs.engine.ElementAttributes" />
	  <set-property 
            name="IsEternal" 
	    value="true" />
	  <set-property 
            name="MaxLifeSeconds" 
	    value="30" />
	  <set-property 
            name="IsSpool" 
	    value="true" />
	  <set-property 
            name="IsRemote" 
	    value="true" />
	  <set-property 
            name="IsLateral" 
	    value="true" />
        </element-attributes> 
    </region>
 
  </regions>


	
  <!-- Auxiliary COnfiguration -->

  <auxiliaries>

    <!-- Remote RMI cache without failover -->
    <auxiliary>
        <name>RGroup</name>
        <set-property 	
	    name="classname"
            value="org.apache.jcs.auxiliary.remote.RemoteCacheFactory"
/>
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.remote.RemoteCacheAttributes"
/>
	  <set-property 
            name="RemoteTypeName" 
	    value="LOCAL" />
	  <set-property 
            name="RemoteHost" 
	    value="localhost" />
	  <set-property 
            name="RemotePort" 
	    value="1102" />
	  <set-property 
            name="GetOnly" 
	    value="true" />
	</auxiliary-attributes>
   </auxiliary>


    <!-- Remote RMI cache with failover -->
    <auxiliary>
        <name>RFailover</name>
        <set-property 	
	    name="classname"
            value="org.apache.jcs.auxiliary.remote.RemoteCacheFactory"
/>
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.remote.RemoteCacheAttributes"
/>
	  <set-property 
            name="RemoteTypeName" 
	    value="LOCAL" />
	  <set-property 
            name="FailoverServers" 
	    value="localhost:1102" />
	  <set-property 
            name="GetOnly" 
	    value="false" />
	</auxiliary-attributes>
   </auxiliary>



  <!-- Primary Disk Cache --> 
    <auxiliary>
        <name>DC</name>
        <set-property 	
	    name="classname"           	    
 
value="org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory" />
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes"
/>
	  <set-property 
            name="DiskPath" 
	    value="i:\\dev\\raf" />
	</auxiliary-attributes>
   </auxiliary>


  <!-- HSQL Disk Cache -- too slow --> 
    <auxiliary>
        <name>HDC</name>
        <set-property 	
	    name="classname"           	    
            value="org.apache.jcs.auxiliary.disk.hsql.HSQLCacheFactory"
/>
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.disk.hsql.HSQLCacheAttributes" />
	  <set-property 
            name="DiskPath" 
	    value="i:\\dev\\hsql" />
	</auxiliary-attributes>
   </auxiliary>


  <!-- JISP Disk Cache -- save memory with disk key storage --> 
    <auxiliary>
        <name>HDC</name>
        <set-property 	
	    name="classname"           	    
            value="org.apache.jcs.auxiliary.disk.jisp.JISPCacheFactory"
/>
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.disk.jisp.JISPCacheAttributes" />
	  <set-property 
            name="DiskPath" 
	    value="i:\\dev\\jisp" />
	  <set-property 
            name="ClearOnStart" 
	    value="false" />
	</auxiliary-attributes>
   </auxiliary>


  <!-- Unreliable Lateral --> 
    <auxiliary>
        <name>LUDP</name>
        <set-property 	
	    name="classname"           	    
            value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
/>
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes" />
	  <set-property 
            name="TransmissionTypeName" 
	    value="UDP" />
	  <set-property 
            name="UdpMulticastAddr" 
	    value="228.5.6.7" />
	  <set-property 
            name="UdpMulticastPort" 
	    value="6789" />
	</auxiliary-attributes>
   </auxiliary>


  <!-- JavaGroups Lateral --> 
    <auxiliary>
        <name>LJG</name>
        <set-property 	
	    name="classname"           	    
            value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
/>
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes" />
	  <set-property 
            name="TransmissionTypeName" 
	    value="JAVAGROUPS" />
	  <set-property 
            name="UdpMulticastAddr" 
	    value="228.5.6.7" />
	  <set-property 
            name="UdpMulticastPort" 
	    value="6789" />
	  <set-property 
            name="PutOnlyMode" 
	    value="false" />
	</auxiliary-attributes>
   </auxiliary>


  <!-- Reliable, fast TCP Lateral --> 
    <auxiliary>
        <name>LTCP</name>
        <set-property 	
	    name="classname"           	    
            value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
/>
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes" />
	  <set-property 
            name="TransmissionTypeName" 
	    value="TCP" />
	  <set-property 
            name="TcpServers" 
	    value="localhost:1111,localhost2:1112" />
	  <set-property 
            name="TcpListenerPort" 
	    value="1111" />
	  <set-property 
            name="PutOnlyMode" 
	    value="true" />
	</auxiliary-attributes>
   </auxiliary>

 
  <!-- XMLRPC Lateral --> 
    <auxiliary>
        <name>LTCP</name>
        <set-property 	
	    name="classname"           	    
            value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
/>
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes" />
	  <set-property 
            name="TransmissionTypeName" 
	    value="XMLRPC" />
	  <set-property 
            name="HttpServers" 
	    value="localhost:8182" />
	  <set-property 
            name="HttpListenerPort" 
	    value="8181" />
	  <set-property 
            name="PutOnlyMode" 
	    value="false" />
	</auxiliary-attributes>
   </auxiliary>


  <!-- HTTP Lateral --> 
    <auxiliary>
        <name>LTCP</name>
        <set-property 	
	    name="classname"           	    
            value="org.apache.jcs.auxiliary.lateral.LateralCacheFactory"
/>
	<auxiliary-attributes>
	  <set-property 
            name="classname" 
	
value="org.apache.jcs.auxiliary.lateral.LateralCacheAttributes" />
	  <set-property 
            name="TransmissionTypeName" 
	    value="HTTP" />
	  <set-property 
            name="HttpServers" 
	    value="localhost:8080,localhost:7001,localhost:80" />
	  <set-property 
            name="httpReceiveServlet" 
	    value="/cache/LateralCacheReceiverServlet" />
	  <set-property 
            name="httpDeleteServlet" 
	    value="/cache/DeleteCacheServlet" />
	</auxiliary-attributes>
   </auxiliary>


  <auxiliaries/>

</jcs>



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