Version 6

    Using system properties in config files


    When JBoss reads in XML configuration files and deployment descriptors, it performs variable substitution using the values of system properties in the form of ${} .   In addition to the normal Java sytem properties like, JBoss provides its own properties such and jboss.bind.address


    As with all Java system properties, you can use the -Dproperty=value flag to set or override values for properties.  For example:


    [nr@rubik] % -Dhttp.port=80 default


    If the named system property doesn't exist, no expansion is done.  For example, if there is no system property defined, a config file with the text ${} will simply yield the value ${}


    Since JBoss 4.0, you can specify a default value if the property is not set (among other features).  As an example: $ , if prop is not defined then default is used.  See the JavaDoc for StringPropertyReplacer.