Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-6734

XML serializer serializes the singleFile location property in different way

    XMLWordPrintable

Details

    Description

      In case when persistence is configured with SingleFileStore class and the location is provided with properties, the generated xml contains both the path attribute and the property with the same value.

      This code:

      <infinispan>
      <namedCache name="withLoaderDefaults">
              <persistence>
                  <store class="org.infinispan.persistence.file.SingleFileStore">
                      <properties>
                          <property name="location" value="/tmp/Another-FileCacheStore-Location" />
                      </properties>
                  </store>
              </persistence>
          </namedCache>
      </infinispan>
      

      is converted to:

      <infinispan>
          <threads/>
          <cache-container name="DefaultCacheManager">
              <jmx/>
              <local-cache name="withLoaderDefaults">
                  <transaction mode="NONE"/>
                  <persistence>
                      <file-store path="/tmp/Another-FileCacheStore-Location">
                          <property name="location">
                              /tmp/Another-FileCacheStore-Location
                          </property>
                      </file-store>
                  </persistence>
              </local-cache>
      </cache-container>
      </infinispan>
      

      Also, if the value of location property is set to e.g.

      ${java.io.tmpdir}
      

      , then the evaluated value is placed in the generated xml.
      So the following xml:

      <infinispan>
          <namedCache name="withLoaderDefaults">
              <persistence>
                  <store class="org.infinispan.persistence.file.SingleFileStore">
                      <properties>
                          <property name="location" value="${java.io.tmpdir}" />
                      </properties>
                  </store>
              </persistence>
          </namedCache>
      </infinispan>
      

      is converted to:

      <infinispan>
          <threads/>
          <cache-container name="DefaultCacheManager">
              <jmx/>
              <local-cache name="withLoaderDefaults">
                  <transaction mode="NONE"/>
                  <persistence>
                      <file-store path="/tmp">
                          <property name="location">
                              /tmp
                          </property>
                      </file-store>
                  </persistence>
              </local-cache>
      </cache-container>
      </infinispan>
      

      Attachments

        Issue Links

          Activity

            People

              amanukya@redhat.com Anna Manukyan
              amanukya@redhat.com Anna Manukyan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: