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

Dennis Brouwer dennis.brouwer at kizitos.com
Tue Aug 25 14:52:43 EDT 2015


Hi Emmanuel,

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.


On Tue, Aug 25, 2015 at 7:47 PM, Emmanuel Hugonnet <ehugonne at redhat.com>
wrote:

> Hi,
> Maybe you could use the admin-only mode to create your channel with your
> random name and then restart the server in normal mode.
> Emmanuel
>
> Le 25/08/2015 17:54, Dennis Brouwer a écrit :
> > Thanks Brain for answering this however I am still a bit puzzled,
> >
> > Let me explain:
> >
> > On Tue, Aug 25, 2015 at 5:04 PM, Brian Stansberry <
> brian.stansberry at redhat.com <mailto:brian.stansberry at redhat.com>> wrote:
> >
> >     This attribute does not support use of expressions, so any data you
> >     provide is evaluated simply as a string.
> >
> >
> > "This attribute" most likely refers to the name attribute in <channel
> name="ee"> 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 "ee" 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't find a way to
> > overrule this (I might have overlooked something of course).
> >
> > The only way to make distinct clusters is to add a bunch of pre-defined
> channel definitions and change the channels default. example:
> >
> > /<subsystem xmlns="urn:jboss:domain:jgroups:3.0"> //<channels
> default="${custom_clustername:ee}"> //<channel name="ee"/>/
> > //<channel name="whee"/>
> > /////<channel name="foo"/>
> > //  //</channels> //... //</subsytem>/
> >
> > And then select one of the names using the
> -Dcustom_clustername=[|whee|foo] startup property. However the desired
> behavior is to be flexible
> > and provide a random name at startup time.
> >
> >
> >     It doesn't support expressions because it is what we call a "model
> >     reference" attribute. It's value refers to another element in the
> >     configuration model. We do not allow expressions in those attributes
> >     because it is not possible to have all the necessary data to resolve
> the
> >     expression at the points in time when the correctness of the model
> must
> >     be validated.
> >
> >     On 8/25/15 9:31 AM, Dennis Brouwer wrote:
> >     > 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> <http://www.zeef.com/>
> >     > US: +1 (415) 992-9409 <tel:%2B1%20%28415%29%20992-9409>
> >     > NL: +31 (085) 888-3186 <tel:%2B31%20%28085%29%20888-3186>
> >     >
> >     >
> >     > _______________________________________________
> >     > wildfly-dev mailing list
> >     > wildfly-dev at lists.jboss.org <mailto:wildfly-dev at lists.jboss.org>
> >     > https://lists.jboss.org/mailman/listinfo/wildfly-dev
> >     >
> >
> >
> >     --
> >     Brian Stansberry
> >     Senior Principal Software Engineer
> >     JBoss by Red Hat
> >     _______________________________________________
> >     wildfly-dev mailing list
> >     wildfly-dev at lists.jboss.org <mailto:wildfly-dev at lists.jboss.org>
> >     https://lists.jboss.org/mailman/listinfo/wildfly-dev
> >
> >
> >
> >
> > --
> > 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
> >
> >
> > _______________________________________________
> > wildfly-dev mailing list
> > wildfly-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/wildfly-dev
> >
>
>


-- 
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/cf81a316/attachment-0001.html 


More information about the wildfly-dev mailing list