<div dir="ltr"><div><div><div>Dear reader,<br><br></div>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.<br><br></div>Let me give an example for the following subsystem:<br><br><span style="font-family:monospace,monospace">&lt;subsystem xmlns=&quot;urn:jboss:domain:jgroups:3.0&quot;&gt;<br>    &lt;channels default=&quot;ee&quot;&gt;<br>        &lt;channel name=&quot;ee&quot;/&gt;<br>    &lt;/channels&gt;<br>    ...<br></span></div><span style="font-family:monospace,monospace">&lt;/subsytem&gt;</span> <br><div><div><br></div><div>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:<br><br><span style="font-family:monospace,monospace">&lt;subsystem xmlns=&quot;urn:jboss:domain:jgroups:3.0&quot;&gt;<br>    &lt;channels default=&quot;${custom_clustername:ee}&quot;&gt;<br>        &lt;channel name=&quot;${custom_clustername:ee}&quot;/&gt;<br>    &lt;/channels&gt;<br>    ...<br>&lt;/subsytem&gt;</span><br><br></div><div>Using this approach however fails to start the container because the channels default attribute is properly evaluated to <span style="font-family:monospace,monospace">&quot;ee&quot;</span> (accoding to specs). However the channel name attribute is not evaluated at all and is registered as <span style="font-family:monospace,monospace">&quot;${custom_clustername:ee}&quot; </span>(without the quotes). <br><br></div><div>I took the liberty to dig in the class: <span style="font-family:monospace,monospace">org.jboss.as.clustering.jgroups.subsystem.JGroupsSubsystemXMLReader</span> 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:<br><br><span style="font-family:monospace,monospace">&lt;subsystem xmlns=&quot;urn:jboss:domain:jgroups:3.0&quot;&gt;<br>    &lt;channels default=&quot;${custom_clustername:ee}&quot;&gt;<br>        &lt;channel name=&quot;ee&quot;/&gt;<br>    &lt;/channels&gt;<br>    ...<br>&lt;/subsytem&gt;<br><br></span></div><div>Which on subsequent container starts and when using the -D<span style="font-family:monospace,monospace">custom_clustername=whee </span><span style="font-family:arial,helvetica,sans-serif">startup property causes a problem because the channels default is evaluated to <span style="font-family:monospace,monospace">&quot;whee&quot;</span> and the channel name remains <span style="font-family:monospace,monospace">&quot;ee&quot;</span>.</span><span style="font-family:monospace,monospace"><br><br></span><span style="font-family:monospace,monospace"><br></span></div><div>So my questions are:<br><br>1] How to solve this issue in a correct way? <br>2] Can somebody provide another mechanism to configure a non default channel name on startup? <br></div><div><br><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Best regards,<br>
<br>
<b>Dennis Brouwer</b><br>
Extraordinary Goalkeeper<br><br><br>
<img src="http://zeef.org/wp-content/themes/twentytwelve-zeef/images/zeef-logo.png" style="margin: 0px 2px; padding: 0px; border: 0px none; max-width: 100%; color: rgb(51, 51, 51); font-family: Arial,sans-serif; font-size: 14px; line-height: 20px;"><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><div style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">ZEEF - Kizitos B.V.<br><div style="margin:0px;padding:0px">Amstelboulevard 184</div><div style="margin:0px;padding:0px">1096 HM Amsterdam</div></div><div style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><a href="http://www.zeef.com/" rel="nofollow" style="color:rgb(67,118,187);text-decoration:none" target="_blank">www.ZEEF.com</a></div><span style="font-family:Arial,sans-serif;font-size:14px;line-height:20px">US: </span><a rel="nofollow" style="color:rgb(67,118,187);font-family:Arial,sans-serif;font-size:14px;line-height:20px">+1 (415) 992-9409</a><div style="margin:0px;padding:0px;color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">NL: <a rel="nofollow" style="color:rgb(67,118,187)">+31 (085) 888-3186</a></div></div></div></div>
</div></div></div>