Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-13674

WARN if deployment descriptor has ${...} but *property-replacement=false

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • 20.0.0.Final
    • EE
    • None

    Description

      WARN if deployment descriptor has ${...} but *property-replacement=false

      By default the property replacement defaults to true for jboss deployment descriptors and false for annotations and spec deployment descriptors:

       

              "annotation-property-replacement" => false,
              "jboss-descriptor-property-replacement" => true,
              "spec-descriptor-property-replacement" => false, 

       

      In the persistence.xml for example, there is a freeform <properties> with properties that can change over time and default values.  If *property-replacement is false , then ${...} is passed to the DUP to configure and can cause problems such as in this hibernate property which changed from default value of false to true and the user was unaware that system property substitution was not occurring because they had not enabled it.

       

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence version="2.1"
          xmlns="http://xmlns.jcp.org/xml/ns/persistence"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
        <persistence-unit name=“example” transaction-type="JTA">
          <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
          <properties>
            <property name="hibernate.cache.use_second_level_cache" value="${hibernate_cache.enabled:false}" />
          </properties>
        </persistence-unit>
      </persistence> 

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            rhn-support-bmaxwell Brad Maxwell
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: