[jboss-jira] [JBoss JIRA] (JBMETA-361) CLONE - application.xml does not fully support property replacement

Tom Fonteyne (JIRA) jira-events at lists.jboss.org
Mon Sep 24 11:31:35 EDT 2012


     [ https://issues.jboss.org/browse/JBMETA-361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Fonteyne updated JBMETA-361:
--------------------------------

    Steps to Reproduce: 
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"


  was:
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"



    
> CLONE - application.xml does not fully support property replacement
> -------------------------------------------------------------------
>
>                 Key: JBMETA-361
>                 URL: https://issues.jboss.org/browse/JBMETA-361
>             Project: JBoss Metadata
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: ear, web
>    Affects Versions: 7.0.4
>            Reporter: Tom Fonteyne
>            Priority: Minor
>         Attachments: PropertyTest.ear
>
>
> Property substitution in application.xml does not work

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list