-1

The properties service (configured in properties-service.xml) in JBoss application server lets you specify external .properties files that are loaded and can then be accessed as system properties from the deployed applications.

(See here http://community.jboss.org/wiki/PropertiesService for more info...)

Is it also possible to load config files in the .xml format instead of .properties?

I know it is possible for certain given configs like for example the mail-service.xml and the jboss-log4j.xml... But they are both loaded directly by JBoss, and not via the properties service.

fgysin
  • 448
  • 2
  • 5
  • 15

1 Answers1

0

This might be possible. The PropertieServices uses the java.util.Properties class, which contains a loadFromXml method. Perhaps you could extend the properties service? Here is some additional info: http://www.webreference.com/programming/Globalize-Web-Applications15_Java6/

Here is some more detailed information on how the SystemProperties service works: http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch10.html

As you may know, you can use either name=value pairs in a .properties file, or a comma-separated list of URL strings in the service descriptor.

Why do you want to use a .xml file instead of .properties?

  • .xml files allow for a more detailed (and hierarchical) organization of properties. And as there are no application specific properties in JBoss, only global ones, a good organization is key to avoid a huge mess in the properties. (Think of a JBoss with some dozen deployed applications...) – fgysin Oct 15 '10 at 08:09
  • Manually extending/writing property loaders isn't really an option. Accessing properties files on the filesystem from JBoss deployed applications is both messy and ugly. – fgysin Oct 15 '10 at 08:10