[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: XML configuration

jmesnil do-not-reply at jboss.com
Tue Jan 20 05:03:59 EST 2009


i've committed XML schema for all our configuration files.

Validation occurs in XmlDeployer subclasses.

Some tidbits about the XML schema:

== order matters ==

I've not found how to provide a "bag" of elements with a XML schema. Elements must now be ordered for the configuration to be valid

== ID/IDREF ==

I took advantage of ID & IDREF in the schema to validate our conf. E.g. if the backup-connector-ref element references a "blah" connector, there MUST be a connector element with the "blah" attribute. I did not change the code but we can now remove some validation done in Java and now handled by XSD.
However this does not apply to cross-configuration files (e.g. jbm-jms.xml connection-factory can not IDREF an element from jbm-configuration.xml).
This still must be done in Java

== Minimal configuration ==

The minimal valid configuration file is


  | <deployment>
  |    <configuration>
  |      <acceptor>...</acceptor>
  |    </configuration>
  | </deployment>
  | 

there MUST be at least 1 declared acceptor. All other elements are optional.

== Default values ==

The XML schemas DOES NOT define any default values. The defaults are taken from Configuration interface if the corresponding XML element is not present in the configuration

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203165#4203165

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203165



More information about the jboss-dev-forums mailing list