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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...