<div dir="ltr"><div>Thanks Brain for answering this however I am still a bit puzzled,<br><br></div>Let me explain:<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 25, 2015 at 5:04 PM, Brian Stansberry <span dir="ltr">&lt;<a href="mailto:brian.stansberry@redhat.com" target="_blank">brian.stansberry@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This attribute does not support use of expressions, so any data you<br>
provide is evaluated simply as a string.<br>
<br></blockquote><div><br></div><div>&quot;This attribute&quot; most likely refers to the name attribute in &lt;channel name=&quot;ee&quot;&gt; if I interpret your sentence correctly. If so, why not create an extra attribute CLUSTER_NAME next to the existing STACK and MODULE attributes and use the CLUSTER_NAME to create the JChannel. Using the current configuration model all containers start up with default cluster name &quot;ee&quot; unless the standalone*.xml file is edited beforehand. This is practically undoable because the cluster name defaults to the name of the channel used and I didn&#39;t find a way to overrule this (I might have overlooked something of course). <br><br></div><div>The only way to make distinct clusters is to add a bunch of pre-defined channel definitions and change the channels default. example:<br><pre style="color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px"><i>&lt;subsystem xmlns=&quot;urn:jboss:domain:jgroups:3.0&quot;&gt;
</i><i>      &lt;channels default=&quot;${custom_clustername:ee}&quot;&gt;
</i><i>          &lt;channel name=&quot;ee&quot;/&gt;</i><br><i><i>          &lt;channel name=&quot;whee&quot;/&gt;<br></i></i><i><i><i>          &lt;channel name=&quot;foo&quot;/&gt;<br></i></i>      </i><i>&lt;/channels&gt;
</i><i>      ...
</i><i>&lt;/subsytem&gt;</i></pre>And then select one of the names using the <span style="font-family:monospace,monospace">-Dcustom_clustername=[|whee|foo]</span> startup property. However the desired behavior is to be flexible and provide a random name at startup time. <span style="font-family:monospace,monospace"><br></span><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
It doesn&#39;t support expressions because it is what we call a &quot;model<br>
reference&quot; attribute. It&#39;s value refers to another element in the<br>
configuration model. We do not allow expressions in those attributes<br>
because it is not possible to have all the necessary data to resolve the<br>
expression at the points in time when the correctness of the model must<br>
be validated.<br>
<div><div class="h5"><br>
On 8/25/15 9:31 AM, Dennis Brouwer wrote:<br>
&gt; Dear reader,<br>
&gt;<br>
&gt; We recently moved to Wildfly 9.0.1.Final (from 8.2.0) for testing and<br>
&gt; stumbled upon a bug regarding expression evaluation in the standalone*.xml.<br>
&gt;<br>
&gt; Let me give an example for the following subsystem:<br>
&gt;<br>
&gt; &lt;subsystem xmlns=&quot;urn:jboss:domain:jgroups:3.0&quot;&gt;<br>
&gt;      &lt;channels default=&quot;ee&quot;&gt;<br>
&gt;          &lt;channel name=&quot;ee&quot;/&gt;<br>
&gt;      &lt;/channels&gt;<br>
&gt;      ...<br>
&gt; &lt;/subsytem&gt;<br>
&gt;<br>
&gt; Since we have several deployment stages on one physical server we need<br>
&gt; to separate the clusters by using a distinct name for each one of the<br>
&gt; stages deployed. Hence we introduced a startup property to be<br>
&gt; substituted in the standalone*.xml configuration like following snippet<br>
&gt; clarifies:<br>
&gt;<br>
&gt; &lt;subsystem xmlns=&quot;urn:jboss:domain:jgroups:3.0&quot;&gt;<br>
&gt;      &lt;channels default=&quot;${custom_clustername:ee}&quot;&gt;<br>
&gt;          &lt;channel name=&quot;${custom_clustername:ee}&quot;/&gt;<br>
&gt;      &lt;/channels&gt;<br>
&gt;      ...<br>
&gt; &lt;/subsytem&gt;<br>
&gt;<br>
&gt; Using this approach however fails to start the container because the<br>
&gt; channels default attribute is properly evaluated to &quot;ee&quot; (accoding to<br>
&gt; specs). However the channel name attribute is not evaluated at all and<br>
&gt; is registered as &quot;${custom_clustername:ee}&quot; (without the quotes).<br>
&gt;<br>
&gt; I took the liberty to dig in the class:<br>
&gt; org.jboss.as.clustering.jgroups.subsystem.JGroupsSubsystemXMLReader and<br>
&gt; manually do the expression evaluation for the channel name. At first<br>
&gt; glance this seems to work however the container rewrites the<br>
&gt; standalone*.xml file at a certain moment resulting in this snippet:<br>
&gt;<br>
&gt; &lt;subsystem xmlns=&quot;urn:jboss:domain:jgroups:3.0&quot;&gt;<br>
&gt;      &lt;channels default=&quot;${custom_clustername:ee}&quot;&gt;<br>
&gt;          &lt;channel name=&quot;ee&quot;/&gt;<br>
&gt;      &lt;/channels&gt;<br>
&gt;      ...<br>
&gt; &lt;/subsytem&gt;<br>
&gt;<br>
&gt; Which on subsequent container starts and when using the<br>
&gt; -Dcustom_clustername=whee startup property causes a problem because the<br>
&gt; channels default is evaluated to &quot;whee&quot; and the channel name remains &quot;ee&quot;.<br>
&gt;<br>
&gt;<br>
&gt; So my questions are:<br>
&gt;<br>
&gt; 1] How to solve this issue in a correct way?<br>
&gt; 2] Can somebody provide another mechanism to configure a non default<br>
&gt; channel name on startup?<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Best regards,<br>
&gt;<br>
</div></div>&gt; *Dennis Brouwer*<br>
&gt; Extraordinary Goalkeeper<br>
<span class="">&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ZEEF - Kizitos B.V.<br>
&gt; Amstelboulevard 184<br>
&gt; 1096 HM Amsterdam<br>
</span>&gt; <a href="http://www.ZEEF.com" rel="noreferrer" target="_blank">www.ZEEF.com</a> &lt;<a href="http://www.zeef.com/" rel="noreferrer" target="_blank">http://www.zeef.com/</a>&gt;<br>
<span class="">&gt; US: <a href="tel:%2B1%20%28415%29%20992-9409" value="+14159929409">+1 (415) 992-9409</a><br>
&gt; NL: <a href="tel:%2B31%20%28085%29%20888-3186" value="+31858883186">+31 (085) 888-3186</a><br>
&gt;<br>
&gt;<br>
</span>&gt; _______________________________________________<br>
&gt; wildfly-dev mailing list<br>
&gt; <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
&gt;<br>
<span class=""><font color="#888888"><br>
<br>
--<br>
Brian Stansberry<br>
Senior Principal Software Engineer<br>
JBoss by Red Hat<br>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><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>