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