-
1. Re: XML configuration
jmesnil Jan 16, 2009 12:27 PM (in response to jmesnil)another thing I forgot to mention...
we will validate the configuration when starting the server but we can also provide a Ant task to help the user make sure his configuration is valid without restarting the server on and on -
2. Re: XML configuration
timfox Jan 16, 2009 12:31 PM (in response to jmesnil)"jmesnil" wrote:
The merge I thought would be queues.xml & jbm-jms.xml. The first time, I wanted to add a JMS queue, I added settings only and did not declare it in jbm-jms.xml.
No, core must be independent of JMS. We can't have JMS stuff in a core config file.
However queues.xml can be merged with jbm-configuration.xm -
3. Re: XML configuration
ataylor Jan 16, 2009 12:39 PM (in response to jmesnil)I also thought about merging our configuration files.
it should be just a case of changing ' public String[] getElementTagName()' in XmlDeployer -
4. Re: XML configuration
jmesnil Jan 19, 2009 4:03 AM (in response to jmesnil)"timfox" wrote:
However queues.xml can be merged with jbm-configuration.xm
I prefer to keep them separate so that in a cluster, both master and backup nodes could "share" the same queues.xml file. -
5. Re: XML configuration
timfox Jan 19, 2009 5:17 AM (in response to jmesnil)"jmesnil" wrote:
I prefer to keep them separate so that in a cluster, both master and backup nodes could "share" the same queues.xml file.
good point -
6. Re: XML configuration
ataylor Jan 19, 2009 5:21 AM (in response to jmesnil)I prefer to keep them separate so that in a cluster, both master and backup nodes could "share" the same queues.xml file.
The config files support property replacement i.e.<param key="jbm.remoting.netty.port" value="${jbm.remoting.netty.port}" type="Integer"/>
so they could still share the same single config file if needed. -
7. Re: XML configuration
jmesnil Jan 20, 2009 5:03 AM (in response to jmesnil)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