[infinispan-issues] [JBoss JIRA] (ISPN-6734) XML serializer serializes the singleFile location property in different way

Anna Manukyan (JIRA) issues at jboss.org
Tue May 31 04:53:00 EDT 2016


Anna Manukyan created ISPN-6734:
-----------------------------------

             Summary: XML serializer serializes the singleFile location property in different way
                 Key: ISPN-6734
                 URL: https://issues.jboss.org/browse/ISPN-6734
             Project: Infinispan
          Issue Type: Bug
          Components: Configuration
            Reporter: Anna Manukyan


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:
{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>
{code}

is converted to:
{code}
<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>
{code}

Also, if the value of location {{property}} is set to e.g. 
{noformat}
${java.io.tmpdir}
{noformat}
, then the evaluated value is placed in the generated xml.
So the following xml:
{code}
<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>
{code}

is converted to:
{code}
<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>
{code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list