Dear reader,

We recently moved to Wildfly 9.0.1.Final (from 8.2.0) for testing and stumbled upon a bug regarding expression evaluation in the standalone*.xml.

Let me give an example for the following subsystem:

<subsystem xmlns="urn:jboss:domain:jgroups:3.0">
    <channels default="ee">
        <channel name="ee"/>
    </channels>
    ...
</subsytem>

Since we have several deployment stages on one physical server we need to separate the clusters by using a distinct name for each one of the stages deployed. Hence we introduced a startup property to be substituted in the standalone*.xml configuration like following snippet clarifies:

<subsystem xmlns="urn:jboss:domain:jgroups:3.0">
    <channels default="${custom_clustername:ee}">
        <channel name="${custom_clustername:ee}"/>
    </channels>
    ...
</subsytem>


Using this approach however fails to start the container because the channels default attribute is properly evaluated to "ee" (accoding to specs). However the channel name attribute is not evaluated at all and is registered as "${custom_clustername:ee}" (without the quotes).

I took the liberty to dig in the class: org.jboss.as.clustering.jgroups.subsystem.JGroupsSubsystemXMLReader and manually do the expression evaluation for the channel name. At first glance this seems to work however the container rewrites the standalone*.xml file at a certain moment resulting in this snippet:

<subsystem xmlns="urn:jboss:domain:jgroups:3.0">
    <channels default="${custom_clustername:ee}">
        <channel name="ee"/>
    </channels>
    ...
</subsytem>

Which on subsequent container starts and when using the -Dcustom_clustername=whee startup property causes a problem because the channels default is evaluated to "whee" and the channel name remains "ee".


So my questions are:

1] How to solve this issue in a correct way?
2] Can somebody provide another mechanism to configure a non default channel name on startup?


--
Best regards,

Dennis Brouwer
Extraordinary Goalkeeper




ZEEF - Kizitos B.V.
Amstelboulevard 184
1096 HM Amsterdam
US: +1 (415) 992-9409