<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
If the attribute is going to be undefined what is the benefit of
having it in the model? If the tooling is looking for an attribute
that doesn't exist wouldn't they just check for the existence with
ModelNode.has()?<br>
<br>
I don't write any tooling so maybe I'm off :) I just don't see the
benefit of adding an attribute that will always be UNDEFINED though.<br>
<br>
<div class="moz-cite-prefix">On 07/13/2015 02:26 PM, Tomaž Cerar
wrote:<br>
</div>
<blockquote
cite="mid:CAMquZP4P8S8tEsJaMbR=GC2jhsvCc3+dz+g=QmoFtxErjQ0szA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>Hey guys,<br>
<br>
</div>
We had interesting discussion with Brian on <a
moz-do-not-send="true"
href="https://github.com/wildfly/wildfly-core/pull/848#issuecomment-119778986"><a class="moz-txt-link-freetext" href="https://github.com/wildfly/wildfly-core/pull/848#issuecomment-119778986">https://github.com/wildfly/wildfly-core/pull/848#issuecomment-119778986</a></a>
<br>
</div>
about how we register runtime/metric attribute on
resources.<br>
<br>
</div>
There are many cases where subsystems only register
attributes / resources only when server is booting into
normal mode.<br>
</div>
but if it server is booted only to "admin mode" all that
runtime/metrics attributes are not registered and as such
not seen in the model.<br>
<br>
</div>
Registering runtime attributes only in normal mode can cause
that results of :read-resource-description/read-resource <br>
wouldn't return attributes that are on resources if server is
started in admin mode or even CLI standalone.<br>
Our metadata already provides information if attributes is
runtime/metric/configuration.<br>
<br>
</div>
<div>This can cause problems for tooling that relies on output
of those two operations.<br>
</div>
<div><br>
</div>
<div>Looking at current state of the code, we do use both ways
of registering attributes either conditionally or always.<br>
</div>
<div>This probably originates from times where there was no good
api/way to mark attribute/resource as runtime.<br>
</div>
<div><br>
</div>
<div>I am personally am in favor of always registering runtime
attributes as this makes sure that user isn't surprised by
some extra/missing<br>
</div>
<div>attributes based on fact how it is starting the server. <br>
<br>
<br>
</div>
<div>What do you guys think? Should we always register it or
have it conditionally?<br>
<br>
--<br>
</div>
<div>tomaz<br>
</div>
<div><br>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
wildfly-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/wildfly-dev">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
James R. Perkins
JBoss by Red Hat</pre>
</body>
</html>