Version 4

    This article will talk about setting the system properties in JBoss AS7+

     

    To understand the potential files where the system properties can be configured,  please refer to AS7 Admin Guide.

    https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-SystemProperties

     

     

    In the Standalone mode,  the change will go into standalone.xml

    In the Domain mode, the change will go into domain.xml

     

    Add it to the system-properties  element right after the extensions element.

     

    <server name="xyz.home" xmlns="urn:jboss:domain:1.0">
        <extensions>
            <extension module="org.jboss.as.clustering.infinispan"/>
            <extension module="org.jboss.as.clustering.jgroups"/>
            <extension module="org.jboss.as.connector"/> 
            ....
            <extension module="org.torquebox.web"/>
        </extensions>
        <system-properties>
            <property name="org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR" value="false"/>
        </system-properties>
    

     

    Adding and reading system property using CLI

    For standalone mode:

     

    $ ./bin/jboss-admin.sh --connect controller=IP_ADDRESS
    [standalone@IP_ADDRESS:9999 /] /system-property=foo:add(value=bar)
    [standalone@IP_ADDRESS:9999 /] /system-property=foo:read-resource
    {
        "outcome" => "success",
        "result" => {"value" => "bar"}
    }
    

     

    For domain mode the same commands are used, you can specify system properties for:

     

    • all hosts and instances in domain
    [domain@IP_ADDRESS:9999 /] /system-property=foo:add(value=bar)
    
    • host and its instances
    [domain@IP_ADDRESS:9999 /] /host=master/system-property=foo:add(value=bar)
    
    • just one instance
    [domain@IP_ADDRESS:9999 /] /host=master/server-config=server-one/system-property=foo:add(value=bar)
    

     

    Reference

    http://community.jboss.org/wiki/JBossAS7HowDoI