geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Genender <>
Subject Re: Removing attributes and refs from the config.xml
Date Sat, 25 Feb 2006 22:59:06 GMT
Aaron Mulder wrote:
> I accidentally followed up to this off-list, but I think Jeff and I
> have agreed to disagree.  I prefer to avoid adding extra attributes to
> support an empty string value when we don't seem to really have a need
> for empty string values.  Jeff (if I can try to summarize) feels that
> we ought to support all 3 possibilities (null, empty, not set) for the
> benefit of future GBean implementers who might have different needs. 
> Additional input would be appreciated. summarized me correctly ;-)

As Aaron said, input from others would be appreciated.


> Thanks,
>    Aaron
> On 2/24/06, Jeff Genender <> wrote:
>> Aaron Mulder wrote:
>>> What's wrong with just listing the attribute or reference with no
>>> content but without the new "empty=true"?  As in:
>>> <gbean name="TomcatEngine">
>>>   <reference name="TomcatValveChain" />
>>> </gbean>
>> This may be fine for references, but an empty string could be a
>> reasonable and valid setting for an attribute.  Therefore we need a way
>> to designate a difference between an empty string value, a null value,
>> and full removal of setting the value.
>> I also believe that we should be consistent.  So the way we do it for
>> one, we probably should do it for the other.
>> Jeff
>>> Thanks,
>>>     Aaron
>>> On 2/24/06, Jeff Genender <> wrote:
>>>> The config.xml allows us to declare new GBeans and override references
>>>> and attributes of already existing Gbeans. But there is a missing
>>>> configuration item here, which is the ability to *remove* a reference or
>>>> attribute value from the configuration.  Currently there is no way to do
>>>> this.
>>>> Matt Hogstrom and I ran into this when trying to remove a logging
>>>> reference in one of the GBeans.
>>>> An example of this is the TomcatValveChain on the TomcatEngine.  As it
>>>> stands, our default implementation installs an AccessLogValve into the
>>>> TomcatValveChain reference.  We wanted to shut off logging to test
>>>> different performance numbers and found that there was no way to "clear"
>>>> or remove a reference that was set in the car plan via the config.xml,
>>>> without rebuilding the car from the source.
>>>> On further discussion with David J and Dain, we came up with a new xml
>>>> attribute to place on refs and attribute tags. You would use:
>>>> empty="true"
>>>> Example:  You want to remove the access logger to improve web container
>>>> performance, you would declare the following in the config.xml, which
>>>> would remove the TomcatValveChain from the TomcatEngine:
>>>> ...
>>>> <configuration name="geronimo/tomcat/1.1-SNAPSHOT/car">
>>>>     ...
>>>>     <gbean name="FirstValve" load="false"/>
>>>>     <gbean name="TomcatEngine">
>>>>         <reference name="TomcatValveChain" empty="true"/>
>>>>     </gbean>
>>>>     ...
>>>> </configuration>
>>>> ...
>>>> You would do the same for attributes that needed to be removed.
>>>> I have this all coded up and ready to check in, but wanted to get any
>>>> feedback or issues before I went ahead and did it.
>>>> Comments?
>>>> Jeff

View raw message