Show Table of Contents
12.3. System Properties Management
The management of system properties can be done using the system properties service. 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=valuepairs using thejava.util.Properites.load(java.io.InputStream)method format. Eachproperty=valuestatement is given on a separate line within the body of thePropertiesattribute element. - URLList: a comma separated 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 ofconf/local.propertieswould be treated as a file URL that points to the<jboss-dist>/server/production/conf/local.propertiesfile when running with thedefaultconfiguration file set.
The following illustrates the usage of the system properties service with an external properties file.
<mbean code="org.jboss.varia.property.SystemPropertiesService"
name="jboss.util:type=Service,name=SystemProperties">
<!-- Load properties from each of the given comma separated URLs -->
<attribute name="URLList">
http://somehost/some-location.properties,
./conf/somelocal.properties
</attribute>
</mbean>
The following illustrates the usage of the system properties service with an embedded properties list.
<mbean code="org.jboss.varia.property.SystemPropertiesService"
name="jboss.util:type=Service,name=SystemProperties">
<!-- 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>

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.