Version 5

    System Properties Management

    The management of system properties can be done using the org.jboss.varia.property.SystemPropertiesService MBean. It supports setting of the VM global property values just as java.lang.System.setProperty method and the VM command line arguments do.

     

    Its configurable attributes include:

     

    • Properties: a specification of multiple property name=value pairs using the java.util.Properties.load(java.io.InputStream) method format. Each property=value statement is given on a separate line within the body of the Properties attribute element.

    • URLList: a comma seperated list of URL strings from which to load properties file formatted content. If a component in the list is a relative path rather than a URL it will be treated as a file path relative to the <jboss-dist>/server/<config> directory. For example, a component of conf/local.properties would be treated as a file URL that points to the <jboss-dist>/server/default/conf/local.properties file when running with the default configuration file set.

     

    Both attributes are illustrated in the following jboss-service descriptor:

    <server>
        <mbean code="org.jboss.varia.property.SystemPropertiesService"
               name="jboss.util:type=Service,name=SystemProperties">
                
            <!-- Load properties from each of the given comma seperated URLs -->
            <attribute name="URLList">
                http://somehost/some-location.properties,
                ./conf/somelocal.properties
            </attribute>
                
            <!-- Set properties using the properties file style. -->
            <attribute name="Properties">
                property1=This is the value of my property
                property2=This is the value of my other property
            </attribute>
                
        </mbean>
    </server>
    

     

    The deploy/properties-service.xml includes a SystemPropertiesService template that has the key attributes commented out.

     

    Referenced by: