System Properties Management


The management of system properties can be done using the system properties service. This service supports setting of the VM global property values just as the java.lang.System.setProperty method and the VM command line arguments do.

The configurable attributes of the system properties service include the following:

  • Properties This is a specification of multiple property name=value pairs, using the java.util.Properites.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 This is 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 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.

The following example 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 example 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> 



JBoss 4. 0(c) The Official Guide
JBoss 4.0 - The Official Guide
ISBN: B003D7JU58
EAN: N/A
Year: 2006
Pages: 137

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net