Setting Server properties using the Properties Service
One cool way to add a list of System properties to JBoss is the Properties MBean Service.
In the deployment folder look for "properties-service.xml". (if you don't have it in your release you can create it at any time) :
Now add your properties either in the URLList Attribute or in the Properties Attribute:
property1=This is the value of my property
property2=This is the value of my other property
As you can see the The "URLList" is a comma-separated list of URL strings from which to load properties file-formatted content while the "Properties" is a specification of multiple property name=value pairs
Now you can access your properties with standard:
Logging the startup process
JBoss uses the Log4jService (in JBoss AS 5.x and earlier) or the LoggingService (in JBoss AS 6.x and later) to configure logging.
However this service is not configured until after the bootstrap phase.
If you want to customize the boot loggin you have basically two options:
- Change the configuration inside run.jar
- Use a system property to reference an outside configuration file.
The simplest strategy is to un-jar $JBOSS_HOME/bin/run.jar, change the appropriate properties file and re-jar. (We suggest you using the Open Source archiving software 7-zip which does a good job at editing files inside of archives).
Alternatively, you can also specify the boot log configuration at the command line, instead of editing run.bat/run.sh, for example:
or for the release 6.x :