[wildfly-dev] Widlfly 9.0.1.Final - subsystem expression evaluation not entirely water proof

Dennis Brouwer dennis.brouwer at kizitos.com
Tue Aug 25 10:31:48 EDT 2015


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
www.ZEEF.com <http://www.zeef.com/>
US: +1 (415) 992-9409
NL: +31 (085) 888-3186
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20150825/f5b4092e/attachment.html 


More information about the wildfly-dev mailing list