<div dir="ltr">On Mon, Jan 8, 2018 at 9:25 AM, David Lloyd <span dir="ltr">&lt;<a href="mailto:david.lloyd@redhat.com" target="_blank">david.lloyd@redhat.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sun, Jan 7, 2018 at 7:37 PM, Stuart Douglas<br>
&lt;<a href="mailto:stuart.w.douglas@gmail.com">stuart.w.douglas@gmail.com</a>&gt; wrote:<br>
&gt; On Sat, Jan 6, 2018 at 2:06 AM, Brian Stansberry<br>
&gt; &lt;<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>&gt; wrote:<br>
&gt;&gt; On Fri, Jan 5, 2018 at 8:43 AM, David Lloyd &lt;<a href="mailto:david.lloyd@redhat.com">david.lloyd@redhat.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Fri, Jan 5, 2018 at 8:20 AM, Brian Stansberry<br>
&gt;&gt;&gt; &lt;<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>&gt; wrote:<br>
&gt;&gt;&gt; &gt; In practice the suffix is required. The deployment unit processors need<br>
&gt;&gt;&gt; &gt; to<br>
&gt;&gt;&gt; &gt; know whether they are interested in the deployment, and in the end that<br>
&gt;&gt;&gt; &gt; gets<br>
&gt;&gt;&gt; &gt; back to some DUP or other checking the suffix. The alternative would be<br>
&gt;&gt;&gt; &gt; DUPs<br>
&gt;&gt;&gt; &gt; speculatively digging into the deployment, checking for deployment<br>
&gt;&gt;&gt; &gt; descriptors or annotations and the like and that would be more<br>
&gt;&gt;&gt; &gt; expensive,<br>
&gt;&gt;&gt; &gt; likely buggy (e.g. false positives when some class in the classpath<br>
&gt;&gt;&gt; &gt; includes<br>
&gt;&gt;&gt; &gt; an annotation not relevant to the deployment) and could mess up some<br>
&gt;&gt;&gt; &gt; use<br>
&gt;&gt;&gt; &gt; cases where we want to defer classloading.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Another alternative is for an early processor to identify the type,<br>
&gt;&gt;&gt; tag it on to the deployment context, and then we modify all other DUPs<br>
&gt;&gt;&gt; to use that information.  It seems pretty fragile to rely on the name,<br>
&gt;&gt;&gt; particularly if that mechanism allows the &quot;type&quot; of deployment to<br>
&gt;&gt;&gt; change in mid-deploy.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I agree; if it&#39;s not done that way now, it should be. My *impression* is<br>
&gt;&gt; the general pattern was the way you describe, i.e. for each significant type<br>
&gt;&gt; some early DUP determines it&#39;s a relevant type and attaches some stuff and<br>
&gt;&gt; then later ones rely on the attachments. But my impression could very well<br>
&gt;&gt; be wrong in some or many cases. I haven&#39;t done much DUP work beyond code<br>
&gt;&gt; reviews or simple fixes since the AS 7.0 days.<br>
&gt;&gt;<br>
&gt;&gt; But that early processor still needs a way to identify type and I think<br>
&gt;&gt; that comes down to the suffix.<br>
&gt;<br>
&gt;<br>
&gt; Yes, various early DUP&#39;s call<br>
&gt; org.jboss.as.ee.structure.<wbr>DeploymentTypeMarker#setType to set the deployment<br>
&gt; type, but it is identified via suffix.<br>
&gt;<br>
&gt; As most deployment descriptors are optional there is no 100% reliable way of<br>
&gt; identifying this other than the suffix.<br>
<br>
</div></div>I guess I wasn&#39;t too clear.  I didn&#39;t mean to say there was some other<br>
way to detect the type.  I meant to say that the type determination<br>
should be done *before* the overridden runtime name is applied, not<br>
after.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>I&#39;m confused now. :) </div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Brian Stansberry<div>Manager, Senior Principal Software Engineer</div><div>Red Hat</div></div></div>
</div></div>