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

Reply via email to