Bug 900925 (JBPAPP6-1382)
| Summary: | application.xml does not support property replacement | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Tom Fonteyne <tfonteyn> | ||||
| Component: | EE | Assignee: | baranowb <bbaranow> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 6.0.0 | CC: | bbaranow, cdewolf, nmone, tfonteyn | ||||
| Target Milestone: | --- | ||||||
| Target Release: | EAP 6.3.1 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| URL: | http://jira.jboss.org/jira/browse/JBPAPP6-1382 | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-08-26 10:12:42 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Tom Fonteyne
2012-09-24 15:15:06 UTC
Link: Added: This issue Cloned to JBPAPP-10007 Attachment: Added: PropertyTest.ear Steps to Reproduce: Removed: Attached is a test case. Deploy and access the URL
It will show ${sysProp:'web-test'} ${sysProp:'app-test'}
indicating that substitution was not done.
See application.xml:
<env-entry>
<env-entry-name>test</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>${sysProp:'app-test'}</env-entry-value>
</env-entry>
in web.xml
<context-param>
<param-name>webtest</param-name>
<param-value>${sysProp:'web-test'}</param-value>
</context-param>
I did some digging:
org/jboss/metadata/parser/util/MetaDataElementParser.java:
139 if (DescriptionGroupMetaDataParser.parse(reader, earMetaData.getDescriptionGroup())) {
140 return;
141 }
142 if (EnvironmentRefsGroupMetaDataParser.parse(reader, earMetaData.getEarEnvironmentRefsGroup())) {
143 return;
144 }
are not calling the parse method with the "propertyReplacer"
I suspect the one for web.xml to be similar. Added: Make sure to set:
<subsystem xmlns="urn:jboss:domain:ee:1.1">
<spec-descriptor-property-replacement>
true
</spec-descriptor-property-replacement>
<jboss-descriptor-property-replacement>
true
</jboss-descriptor-property-replacement>
</subsystem>
Attached is a test case. Deploy and access the URL
It will show 'web-test' ${sysProp:'app-test'}
indicating that substitution ins application.xml was not done.
See application.xml:
<env-entry>
<env-entry-name>test</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>${sysProp:'app-test'}</env-entry-value>
</env-entry>
in web.xml
<context-param>
<param-name>webtest</param-name>
<param-value>${sysProp:'web-test'}</param-value>
</context-param>
I did some digging:
org/jboss/metadata/parser/util/MetaDataElementParser.java:
139 if (DescriptionGroupMetaDataParser.parse(reader, earMetaData.getDescriptionGroup())) {
140 return;
141 }
142 if (EnvironmentRefsGroupMetaDataParser.parse(reader, earMetaData.getEarEnvironmentRefsGroup())) {
143 return;
144 }
are not calling the parse method with the "propertyReplacer"
Docs QE Status: Removed: NEW This should be fixed in EAP 6.1.0, as the upstream fix (AS7-5835) is included in 6.1. |