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