-
1. Re: Configure JBoss pre-processing of XML configuration files
kennardconsulting Nov 17, 2011 10:06 PM (in response to kennardconsulting)Answering my own question: this is handled by JBossXB and is configured in /all/deployers/metadata-deployer-jboss-beans.xml
-
2. Re: Configure JBoss pre-processing of XML configuration files
alesj Nov 18, 2011 6:26 PM (in response to kennardconsulting)Replacement should also work in web.xml, since it's JBossXB - as you figured it out - that handles all XML parsing.
Did you manage to turn it on (if it's actually configurable?)?
-
3. Re: Configure JBoss pre-processing of XML configuration files
kennardconsulting Nov 19, 2011 3:42 AM (in response to alesj)Ales,
Thanks for replying.
Yes, I got it sort of working. However it appears to be a bug (or at least a problem in the design) in JBossXB. Specifically: JBossXB appears to validate the schema *before* doing any propertyRef replacements. This is probably because it is using Xerces with schema validation turned on.
However sometimes the schema enumerates valid values for a field. In the case of web.xml's 'transport-guarantee', such values are NONE and CONFIDENTIAL. But they are *not* ${foo:NONE}.
So trying to put a dynamic property ref in some parts of web.xml will fail. It will also fail for other schemas that enumerate valid values. It would be nice to find a solution to this?
Regards,
Richard.
-
4. Re: Configure JBoss pre-processing of XML configuration files
jaikiran Nov 19, 2011 3:59 AM (in response to kennardconsulting)Richard Kennard wrote:
Yes, I got it sort of working. However it appears to be a bug (or at least a problem in the design) in JBossXB. Specifically: JBossXB appears to validate the schema *before* doing any propertyRef replacements. This is probably because it is using Xerces with schema validation turned on.
However sometimes the schema enumerates valid values for a field. In the case of web.xml's 'transport-guarantee', such values are NONE and CONFIDENTIAL. But they are *not* ${foo:NONE}.
I don't think that's the case. My guess is that you are setting the value of that system property via some *-service.xml file? Which might mean that the system property is not yet set when the web.xml is parsed and hence value not substituted. Something along these lines http://community.jboss.org/message/367141#367141. That's just a guess though. The real question is how and when are you setting the value for that "foo" system property?
-
5. Re: Configure JBoss pre-processing of XML configuration files
kennardconsulting Nov 19, 2011 4:04 AM (in response to jaikiran)Jaikiran,
I'm actually not setting the 'foo' property all. But as I understand that shouldn't matter. The JBossXB syntax is:
${foo:NONE}
So if I don't set 'foo' it should default to NONE. But it appears this happens too late in the cycle, because ${foo:NONE} will never pass schema validation.
Regards,
Richard.