<div dir="ltr">On Mon, Jan 8, 2018 at 9:25 AM, David Lloyd <span dir="ltr"><<a href="mailto:david.lloyd@redhat.com" target="_blank">david.lloyd@redhat.com</a>></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>
<<a href="mailto:stuart.w.douglas@gmail.com">stuart.w.douglas@gmail.com</a>> wrote:<br>
> On Sat, Jan 6, 2018 at 2:06 AM, Brian Stansberry<br>
> <<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>> wrote:<br>
>> On Fri, Jan 5, 2018 at 8:43 AM, David Lloyd <<a href="mailto:david.lloyd@redhat.com">david.lloyd@redhat.com</a>><br>
>> wrote:<br>
>>><br>
>>> On Fri, Jan 5, 2018 at 8:20 AM, Brian Stansberry<br>
>>> <<a href="mailto:brian.stansberry@redhat.com">brian.stansberry@redhat.com</a>> wrote:<br>
>>> > In practice the suffix is required. The deployment unit processors need<br>
>>> > to<br>
>>> > know whether they are interested in the deployment, and in the end that<br>
>>> > gets<br>
>>> > back to some DUP or other checking the suffix. The alternative would be<br>
>>> > DUPs<br>
>>> > speculatively digging into the deployment, checking for deployment<br>
>>> > descriptors or annotations and the like and that would be more<br>
>>> > expensive,<br>
>>> > likely buggy (e.g. false positives when some class in the classpath<br>
>>> > includes<br>
>>> > an annotation not relevant to the deployment) and could mess up some<br>
>>> > use<br>
>>> > cases where we want to defer classloading.<br>
>>><br>
>>> 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 "type" of deployment to<br>
>>> change in mid-deploy.<br>
>><br>
>><br>
>> I agree; if it's not done that way now, it should be. My *impression* is<br>
>> the general pattern was the way you describe, i.e. for each significant type<br>
>> some early DUP determines it's a relevant type and attaches some stuff and<br>
>> then later ones rely on the attachments. But my impression could very well<br>
>> be wrong in some or many cases. I haven't done much DUP work beyond code<br>
>> reviews or simple fixes since the AS 7.0 days.<br>
>><br>
>> But that early processor still needs a way to identify type and I think<br>
>> that comes down to the suffix.<br>
><br>
><br>
> Yes, various early DUP's call<br>
> org.jboss.as.ee.structure.<wbr>DeploymentTypeMarker#setType to set the deployment<br>
> type, but it is identified via suffix.<br>
><br>
> As most deployment descriptors are optional there is no 100% reliable way of<br>
> identifying this other than the suffix.<br>
<br>
</div></div>I guess I wasn't too clear. I didn'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'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>