David Blevins wrote:


Seems either next to the namespace declaration or in a separate section of the plan, or both.

So like:
<xattribute name="securityConfig">
    <security xmlns="http://geronimo.apache.org/xml/ns/security" plan:builder="o.a.g.SecurityBuilder">
        <default-principal realm-name="public-properties-realm">
            <principal class="o.a.g.s.r.p.GeronimoUserPrincipal" name="j2ee"/>
        </default-principal>
        <role-mappings>
            <role role-name="Administrator">
                <realm realm-name="public-properties-realm">
                    <principal 
class="o.a.g.s.r.p.GeronimoUserPrincipal" name="j2ee"/>
                </realm>
            </role>
            <role role-name="Employee">
                <realm realm-name="public-properties-realm">
                    <principal 
class="o.a.g.s.r.p.GeronimoUserPrincipal" name="j2ee"/>
                </realm>
            </role>
        </role-mappings>
    </security>
</xattibute>

Where builder is an attribute in the plan namespace, so the embedded schema doesn't need to be one we control.

Or else some section containing builders:

<builders xmlns:security="http://geronimo.apache.org/xml/ns/security" xmlns:ejb="...." xmlns:connector="....">
    <builder impl="security:o.a.g.SecurityBuilder"/>
    <builder impl="ejb:o.o.d.OpenEJBBuilder"/>
    <builder impl="connector:o.a.g.ConnectorBuilder"/>
</builders>

Or a variant of that:

<builders>
    <builder impl="security:o.a.g.SecurityBuilder"  xmlns:security="http://geronimo.apache.org/xml/ns/security"/>
    <builder impl="ejb:o.o.d.OpenEJBBuilder" xmlns:ejb="...." />
    <builder impl="connector:o.a.g.ConnectorBuilder" xmlns:connector="...."/>
</builders>


Since the primary job of a builder is to put a GBean into the system, we could take Hiram's GBeanInfoFactory idea and mix it in somewhat.  Meaning that the builder could create the GBeanInfo as well.  Se we give builders the ability to have properties themselves:

<builders>
    <builder impl="security:o.a.g.SecurityBuilder"  xmlns:security="http://geronimo.apache.org/xml/ns/security">
        <property name="attributeDefault" value="read-only" />
    </builder>
</builders>

Maybe that is not a good example proptery, but the idea is that if they are responsible for creating GBeans, and potentially the GBeanInfo, they may need some setup themselves.

Anyway, just throwing ideas out.  Pick, pook, prod, or ignore.
  

Stealing a page from the JavaMail spec, why not have resource files called geronimo.builders and geronimo.default.builders.  These are resource files located in META-INF.  They declare a builders and could also hold their configuration.  This way, we wouldn't have to embed the name of the builder in the config file, just use the namespace.


Regards,
Alan