Version 4

    This page describes the unified domain model schema to be introducted into AS 7.

     

    Configuration Documents

     

    The expectation is that there will be two types of configuration documents associated with an AS 7 domain:

     

    • domain.xml: contains non-host-specific configuration (e.g. deployments, containers, server-groups etc.) The DomainController is authoritative for the content of this file. In ordinary usage starting a server involves contacting the DC to sync the local environment with the DC's view of the domain.xml content
    • host.xml: contains host-specific configuration, e.g. servers deployed on the host along with host-specific configurations like IP addresses. The ServerManager is authoritative for the content of this file. In ordinary usage starting a server involves the SM contacting the DC to inform it of the content of its host.xml. The management API exposed by the DC, however, allows update of configuration that ends up in a host.xml.

     

    Example Documents

     

    Following are example domain.xml and host.xml documents. These are not final documents; they are drafts that will be updated periodically.

    See also http://community.jboss.org/thread/153920?tstart=0 for some significant proposed content that isn't included in this example.

     

    domain.xml

     

    <domain xmlns="urn:jboss:domain:1.0"
            xmlns:remoting="urn:jboss:domain:remoting:1.0"
            xmlns:threads="urn:jboss:domain:threads:1.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="urn:jboss:domain:1.0 jboss-domain.xsd
                                urn:jboss:domain:remoting:1.0 jboss-remoting.xsd
                                urn:jboss:domain:threads:1.0 jboss-threads.xsd">
    
        <extensions>
            <extension module="org.foo:blah"/>
        </extensions>
    
        <!-- The domain manager/server bootstrap configuration -->
        <domain-configuration>
            <!-- The URI for bootstraping a domain server -->
            <bootstrapURI>http://bootstrap.uri</bootstrapURI>
        </domain-configuration>
    
        <profiles>
            <profile name="something">
                <!-- FIXME move web-containers to another namespace -->
                <web-containers>
                    <web-container name="jboss.web">
                        <config>
                            <servlets>
                                <default listings="true" />
                                <ssi/>
                            </servlets>
                        </config>
                        
                        <!--  FIXME the use of address/port here needs to be updated to use the central socket configuration facility -->
                        <connector name="httpsConnector" protocol="tls" scheme="https" secure="true" 
                                        default-virtual-server="localhost">
                            <ssl name="jbossweb"/>
                            <socket name="https"/>
                        </connector>
        
                        <virtual-server name="localhost">
                            <access-log/>
                            <connector>httpsConnector</connector>
                            <host>localhost</host>
                        </virtual-server>
                   </web-container>
                </web-containers>
            </profile>
        
            <profile name="something2">
                <include profile="something"/>
                <threads:subsystem>
                    <threads:queueless-thread-pool-executor name="remoting">
                        <threads:max-threads count="10" per-cpu="20"/>
                        <threads:keepalive-time time="10" unit="s"/>
                    </threads:queueless-thread-pool-executor>
                </threads:subsystem>
                <remoting:subsystem thread-pool="remoting-pool">
                    <remoting:connector name="default-connector" socket-binding="remoting"/>
                </remoting:subsystem>
            </profile>
        </profiles>
    
        <!--  
             Named interfaces that can be referenced elsewhere. Different
             mechanisms for associating an IP address with the interface
             are shown.
        -->
        <interfaces>
    
            <interface name="default">
                <!--  Here we directly state the IP address -->
                <inet-address value="127.0.0.1"/>
            </interface>
            <interface name="external">
                <!--  
                    Here we name the NIC; the IP address associated with NIC whose
                    byte representation has the lowest
                -->
                <nic name="eth1"/>
            </interface>
            <interface name="internal">
                <!-- 
                    Here we provide a set of criteria that are used to narrow the
                    set of IP addresses available on the host to one that is acceptable.
                -->
                <not><loopback/></not>
                <point-to-point/>
                <multicast/>
                <up/>
                <site-local-address/>
    
                <!-- Alternatively... 
                <public-address/>
                -->
                <nic name="eth0"/>
                <nic-match pattern="eth[0-9]+"/>
                <!-- The 'any' element means the included criteria are not exclusive -->
                <any>
                    <subnet-match value="10.0.0.0/8"/>
                    <subnet-match value="192.168.0.0/16"/>
                </any>
            </interface>
            <!-- 
                 For these next two, no address selection criteria is provided, so 
                 an override at the host or server level is required. 
            -->
            <interface name="public3"/>
            <interface name="public4"/>
        </interfaces>
    
        <socket-binding-groups>
             <socket-binding-group name="standard-sockets" default-interface="external">
                <socket-binding name="jndi" port="1099"/>
                <socket-binding name="http" port="8080"/>
                <socket-binding name="https" port="8447"/>
                <socket-binding name="remoting" port="4447"/>
             </socket-binding-group>
             <socket-binding-group name="standard-clustered-sockets" default-interface="internal">
                <include socket-binding-group="standard-sockets"/>
                <socket-binding name="cluster-udp" interface="internal" multicast-port="55200"/>
                <socket-binding name="cluster-failure-detection" interface="internal" port="54200"/>
                <socket-binding name="ha-jndi" port="1100"/>
                <socket-binding name="ha-jndi-discovery" multicast-port="1102"/>
             </socket-binding-group>
        </socket-binding-groups>
    
        <ssls>
             <ssl name="jbossweb" password="changeit" cipher-suite="SSLv2+SSLv3"/>
        </ssls>
    
        <system-properties>
            <property name="prop1" value="value1"/>
            <property name="prop2" value="value2"/>
        </system-properties>
        
        <deployments>
            <deployment name="my-app.ear" sha1="xxx"/>
            <deployment name="my-ejb.jar" sha1="xxx"/>
            <deployment name="my-war.ear" sha1="xxx" allowed="false" start="false"/>
        </deployments>
    
        <server-groups>
            <server-group name="main-server-group" profile="something">
    
               <jvm name="icedtea1">
                  <heap size="512m" max-size="1024m"/>
               </jvm>
    
               <socket-binding-group ref="standard-clustered-sockets"/>
    
    <!--       TODO this has to be clarified
               <cluster default-multicast-address="230.0.0.4">
                 <group-communication-config name="udp">
                     <udp-tranpsort socket="cluster-udp"/>
                 </group-communication-config>  
                 <core-framework state-transfer-timeout="5000" method-call-timeout="2000"/>
                 <ha-jndi socket="ha-jndi" discovery-socket="ha-jndi-discovery"/>
               </cluster>
    -->
                <deployments>
                    <deployment name="my-app1.ear" sha1="xxx" start="true"/>
                    <deployment name="my-app2.ear" sha1="xxx" start="false"/>
                </deployments>
    
                <system-properties>
                   <property name="prop1" value="value1"/>
                   <property name="prop2" value="value2"/>
                </system-properties>
            </server-group>
        </server-groups>
    
    </domain>

     

    host.xml:

     

    <host xmlns="urn:jboss:domain:1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="urn:jboss:domain:1.0 jboss-domain-host.xsd">
    
        <domain-controller>
           <remote location="http://somehost.example.com/domain-controller"
                   callback-location="http://dakldjskal"
                   outbound-interface="public"
                   callback-outbound-interface="public"/>
        </domain-controller>
    
        <interfaces>
            <interface name="public3">
                <inet-address value="10.0.0.1"/>
            </interface>
        </interfaces>
    
        <jvms>
            <!-- all-jvm settings e.g. sys props, -->
            <jvm name="icedtea1" java-home="/blha">
                <environment-variables>
                    <variable name="foo"/>
                </environment-variables>
                <system-properties>
                    <property name="foo" value="bar"/>
                </system-properties>
            </jvm>
        </jvms>
    
        <servers>
            <server name="server-one" group="main-server-group" start="false">
    
                <priority value="20"/>
    
                <cpu-affinity cpus="1 2 3 4"/>
                
                <interface-specs>
                    <!-- public4 address wasn't defined in domain or host so
                         we have to define it at server level -->
                    <interface name="public4">
                        <inet-address value="192.168.100.1"/>
                    </interface>
                </interface-specs>
    
                <!-- server-one inherits the default socket-group declared in the server-group -->
                
                <jvm>
                   <heap size="64m" max-size="512m"/>
                   <stack size="128k"/>
                   <environment-variables>
                      <variable name="var1" value="value1"/>
                      <variable name="var2"/>
                   </environment-variables>
    
                   <system-properties>
                      <property name="blah" value="blahblah"/>
                      <property name="justName"/>
                   </system-properties>
                   <jvm-options>
                      <option value="-server"/>
                      <option value="-ea"/>
                   </jvm-options>
                </jvm>
            </server>
            <server name="server-two" group="main-server-group" start="false">
    
                <priority value="20"/>
    
                <cpu-affinity cpus="1 2 3 4"/>
                
                <interface-specs>
                    <!-- public4 address wasn't defined in domain or host so
                         we have to define it at server level -->
                    <interface name="public4">
                        <inet-address value="192.168.100.3"/>
                    </interface>
                </interface-specs>
                
                <!-- server-two avoids port conflicts by incrementing the ports in 
                     the default socket-group declared in the server-group -->
                <socket-binding-group ref="standard-clustered-sockets" port-offset="150"/>
                
                <jvm>
                   <heap size="64m" max-size="512m"/>
    
                   <stack size="128k"/>
    
                   <system-properties>
                      <property name="blah" value="blahblah"/>
                   </system-properties>
    
                   <jvm-options>
                      <option value="-server"/>
                      <option value="-ea"/>
                   </jvm-options>
                </jvm>
    
            </server>
            <server name="server-three" group="main-server-group" start="false">
    
                <priority value="20"/>
    
                <cpu-affinity cpus="1 2 3 4"/>
                
                <!-- server-three inherits the default socket-group declared in 
                     the server-group but avoids port conflicts with server-one
                     by using a different IP for the relevant interfaces -->
                <interface-specs>
                    <interface name="external">
                        <inet-address value="4.5.6.7"/>
                    </interface>
                    <interface name="internal">
                        <inet-address value="10.0.0.3"/>
                    </interface>
                    <!-- public4 address wasn't defined in domain or host so
                         we have to define it at server level -->
                    <interface name="public4">
                        <inet-address value="192.168.100.3"/>
                    </interface>
                </interface-specs>
    
                <jvm>            
                   <heap size="64m" max-size="512m"/>
    
                   <stack size="128k"/>
          
                   <system-properties>
                      <property name="blah" value="blahblah"/>
                   </system-properties>
    
                   <jvm-options>
                      <option value="-server"/>
                      <option value="-ea"/>
                   </jvm-options>
                </jvm>
            </server>
        </servers>
    </host>

    Discussion

     

    Discussion of the schema is in a number of threads in the Discussions section of this space. Input is welcome.

     

    Initial Version

    The following image shows an overview of the Scott's first take on the key domain element structure. The schema xsd files that went into this image can be found in the attached domain-schema.zip archive.

     

    jboss-domain_schema.png