Spring xml config: the network socket-options attributes should be of type xs:string #4700

Closed
dsukhoroslov opened this Issue Mar 2, 2015 · 2 comments

Projects

None yet

5 participants

@dsukhoroslov
Contributor

As of now they're of various simple types:

<xs:complexType name="socket-options">
    <xs:attribute name="tcp-no-delay" type="xs:boolean" use="optional" default="false"/>
    <xs:attribute name="keep-alive" type="xs:boolean" use="optional" default="true"/>
    <xs:attribute name="reuse-address" type="xs:boolean" use="optional" default="true"/>
    <xs:attribute name="linger-seconds" type="xs:unsignedInt" use="optional" default="3"/>
    <xs:attribute name="buffer-size" use="optional" default="32">
        <xs:simpleType>
            <xs:restriction base="xs:unsignedInt">
                <xs:minInclusive value="1"/>
            </xs:restriction>
        </xs:simpleType>
    </xs:attribute>
</xs:complexType>

The types are correct, but prevent us from use of Spring property placeholders. It is not allowed to set the following configuration, for instance:

    <hz:network smart-routing="true">
        <hz:member>${my.schema.members}</hz:member>
        <hz:socket-options buffer-size="${my.buffer.size}"/>
    </hz:network>

because the buffer-size attribute is of type xs:unsignedInt and such config file will not pass initial validation by schema. Is it possible to use xs:string type instead? This change will be backward compartible, shouldn't be any issues with existing configs.

Thanks, Denis.

@dsukhoroslov dsukhoroslov changed the title from The network socket-options attributes should be of type xs:string to Spring xml config: the network socket-options attributes should be of type xs:string Mar 2, 2015
@gurbuzali gurbuzali added this to the 3.6 milestone Mar 2, 2015
@dsukhoroslov
Contributor

I can make a PR for this for 3.5, is it ok? The change is quite simple in hazelcast-spring-3.5.xsd only

@metanet metanet removed the Team: Core label Mar 3, 2015
@bilalyasar bilalyasar self-assigned this May 12, 2015
@mesutcelik
Contributor

fixed by #5590

@mesutcelik mesutcelik closed this Jul 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment