Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1828

Allow protocols to define inline XML config

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 3.5
    • None
    • None

      Some protocols (e.g. RELAY2 or FORK) need additional configuration, which is usually defined in a separate XML file, e.g.

      <FORK config="/home/bela/fork-stacks.xml"/>
      

      File fork-stacks.xml is:

      <fork-stacks xmlns="fork-stacks">
          <fork-stack id="counter">
              <config>
                  <COUNTER bypass_bundling="true"/>
                  <COMPRESS/>
              </config>
          </fork-stack>
      
         <fork-stack id="locking">
             <config>
                 <CENTRAL_LOCK num_backups="2"/>
             </config>
         </fork-stack>
      </fork-stacks>
      

      It would be nice to be able to optionally define such additional configuration inline, e.g.

      <FORK>
        <fork-stacks xmlns="fork-stacks">
            <fork-stack id="counter">
                <config>
                    <COUNTER bypass_bundling="true"/>
                    <COMPRESS/>
                </config>
            </fork-stack>
      
           <fork-stack id="locking">
               <config>
                   <CENTRAL_LOCK num_backups="2"/>
               </config>
           </fork-stack>
        </fork-stacks>
      </FORK>
      

      As the schema for config files is generated, we would have to able to tell the generator (XMLSchemaGenerator) to include a schema fragment defined by any protocol.
      A schema fragment could be defined via an annotation, e.g. @IncludeSchema(schema="fork-stacks.xsd".

      Investigate whether this is feasible.

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: