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