Version 4

    A common configuration change to the AS7 server is the addition of a subsystem. This requires adding the subsystem extension and the subsystem. This can be done with two CLI commands. Consider the JMX subsystem elements found in the standalone.xml:

     

    <extension module="org.jboss.as.jmx"/>
       <subsystems>
    ...
            <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true">
                <jmx-connector server-binding="jmx-connector-server" registry-binding="jmx-connector-registry"/>
            </subsystem>
    ...
        <socket-binding-group name="standard-sockets" default-interface="public">
    ...
            <socket-binding name="jmx-connector-registry" port="1090" interface="management"/>
            <socket-binding name="jmx-connector-server" port="1091" interface="management"/>
    

     

    These can be added via the following two CLI commands:

    Note that the jmx extension must be added first in order for the add subsystem=jmx command to be recognized as having a handler.

     

    [standalone@localhost:9999 /] /extension=org.jboss.as.jmx:add
    {"outcome" => "success"}
    [standalone@localhost:9999 /] /:composite(steps=[{"operation" => "add","address" => [("subsystem" => "jmx")], "show-model" => true}, {"operation" => "add-connector", "address" => [("subsystem" => "jmx")], "server-binding" => "jmx-connector-server", "registry-binding" => "jmx-connector-registry"}, {"operation" => "add", "address" => [("socket-binding-group" => "standard-sockets"), ("socket-binding" => "jmx-connector-registry")], "port" => 1090, "interface" => "management"}, {"operation" => "add", "address" => [("socket-binding-group" => "standard-sockets"), ("socket-binding" => "jmx-connector-server")], "port" => 1091, "interface" => "management"}])
    {
        "outcome" => "success",
        "result" => {
            "step-1" => {"outcome" => "success"},
            "step-2" => {"outcome" => "success"},
            "step-3" => {"outcome" => "success"},
            "step-4" => {"outcome" => "success"}
        }
    }
    

     

    A comparision between the previous and current standalone.xml show the expected elements have been added:

     

    [113](ironmaiden:bin) > diff ../standalone/configuration/standalone_xml_history/standalone.last.xml ../standalone/configuration/standalone_xml_history/standalone.boot.xml 
    26d25
    <         <extension module="org.jboss.as.jmx"/>
    353,355d351
    <         <subsystem xmlns="urn:jboss:domain:jmx:1.1" show-model="true">
    <             <jmx-connector server-binding="jmx-connector-server" registry-binding="jmx-connector-registry"/>
    <         </subsystem>
    377,378d372
    <         <socket-binding name="jmx-connector-registry" port="1090" interface="management"/>
    <         <socket-binding name="jmx-connector-server" port="1091" interface="management"/>
    380c374
    < </server>
    \ No newline at end of file
    ---
    > </server>