<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Nicklas,</div><div><br></div>I had been thinking of doing something along similar lines.<div><br></div><div>However, I was considering a CLI command related to "deploy" that is able to replicate the class loading environment for each part of a deployment (ear, ejb-jar, war, far, etc) and then check whether or not each class in the deployment is already available in the class loader, subject to the spec's API visibility rules.</div><div><br></div><div>That may be a bit over the top though.&nbsp;</div><div><br></div><div>This is also a big +10 from me too, btw. We spend more time on the forums getting people to list their deployment contents when troubleshooting than anything else.</div><div><br></div><div>Steve C</div><div><br><div><br></div><div><br><div><div>On 22/05/2013, at 10:34 PM, Nicklas Karlsson &lt;<a href="mailto:nickarls@gmail.com">nickarls@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">An external tool is probably easiest to develop but wouldn't it be hard to know what classes are implicitly added by the deployers (e.g. JPA stuff based on persistence.xml) presence?<div>For the modules, I guess one could iterate over the module roots, read in the module.xml:S, load thes module and see what's exported and build up a registry to see if there are packages provided both by the deployment and the AS.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 22, 2013 at 3:23 PM, Scott Marlow <span dir="ltr">&lt;<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 05/22/2013 04:04 AM, Nicklas Karlsson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That's a good example. I guess the JPA subsystem could check for<br>
incorrectly bundled Hibernate, JSF for incorrectly bundled impl, JAX-RS<br>
probably could use their own. Could they all be extracted to a common<br>
deployment-check-subsystem (or more precisely, should they?)<br>
</blockquote>
<br></div>
+10 for this idea.<br>
<br>
I like both approaches. &nbsp;It would be great to have a deployment *lint* detector of some form. &nbsp;If it is created as a common system, it might be more difficult to reach into the various deployers to diagnose issues.<br>
<br>
For the common approach, it could also be a standalone tool that is built up over time. &nbsp;If it is standalone, a log scanner would be a nice complement so that we could easily identify common runtime problems in addition to deployment time.<br>

<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On Wed, May 22, 2013 at 10:46 AM, Alessio Soldano &lt;<a href="mailto:asoldano@redhat.com" target="_blank">asoldano@redhat.com</a><br></div><div><div class="h5">
&lt;mailto:<a href="mailto:asoldano@redhat.com" target="_blank">asoldano@redhat.com</a>&gt;&gt; wrote:<br>
<br>
&nbsp; &nbsp; Just FYI, the webservices subsystem has something related to this topic,<br>
&nbsp; &nbsp; see <a href="https://issues.jboss.org/browse/WFLY-451" target="_blank">https://issues.jboss.org/<u></u>browse/WFLY-451</a> . Basically deployments<br>
&nbsp; &nbsp; containing WS endpoints are scanned by the webservices susbsystem to<br>
&nbsp; &nbsp; detect Apache CXF libraries (which should not be included in the<br>
&nbsp; &nbsp; deployment, being them already available on the server). If they're<br>
&nbsp; &nbsp; found, a verbose/explanatory warning is printed and the deployment<br>
&nbsp; &nbsp; aborted.<br>
&nbsp; &nbsp; User will either fix the deployment or disable the webservices subsystem<br>
&nbsp; &nbsp; for it.<br>
<br>
&nbsp; &nbsp; Alessio<br>
<br>
&nbsp; &nbsp; On 05/22/2013 09:22 AM, Nicklas Karlsson wrote:<br>
&nbsp; &nbsp; &nbsp;&gt; (I know there has been some discussion on the topic (old community<br>
&nbsp; &nbsp; &nbsp;&gt; AS7-dev postings, IRC-chat with Tomaz Cerar etc)<br>
&nbsp; &nbsp; &nbsp;&gt;<br>
&nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;Hanging around the forums, I've noticed that a frequent<br>
&nbsp; &nbsp; source of<br>
&nbsp; &nbsp; &nbsp;&gt; hard-to-debug deployment problems and other non-linear-behavior<br>
&nbsp; &nbsp; is that<br>
&nbsp; &nbsp; &nbsp;&gt; people often try to deploy archives with conflicting dependencies<br>
&nbsp; &nbsp; &nbsp;&gt; (various EE APIs/impls already on the AS, JDBC drivers, maven<br>
&nbsp; &nbsp; plugins,<br>
&nbsp; &nbsp; &nbsp;&gt; you name it).<br>
&nbsp; &nbsp; &nbsp;&gt;<br>
&nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; Would it be worthwhile to implement a deployment processor<br>
&nbsp; &nbsp; (disabled<br>
&nbsp; &nbsp; &nbsp;&gt; by default) that would act as a helpful bouncer for the deployment<br>
&nbsp; &nbsp; &nbsp;&gt; archive? We could have a simple isSane(Archive) interface or<br>
&nbsp; &nbsp; something<br>
&nbsp; &nbsp; &nbsp;&gt; and people could write their own implementations (that would be<br>
&nbsp; &nbsp; picked<br>
&nbsp; &nbsp; &nbsp;&gt; up through the java services system or listed explicitly in some<br>
&nbsp; &nbsp; &nbsp;&gt; module?). Default implementation that come to mind is<br>
&nbsp; &nbsp; &nbsp;&gt;<br>
&nbsp; &nbsp; &nbsp;&gt; * Blacklisted packages (using Tattletale to warn users if they are<br>
&nbsp; &nbsp; &nbsp;&gt; bundling e.g. EE impls/APIs)<br>
&nbsp; &nbsp; &nbsp;&gt; * Version limiter (using Tattletale to warn if deployment<br>
&nbsp; &nbsp; contains too<br>
&nbsp; &nbsp; &nbsp;&gt; old version of lib, e.g. Spring)<br>
&nbsp; &nbsp; &nbsp;&gt; * Unused libs (using Tattletale to warn if deployment contains<br>
&nbsp; &nbsp; unused jars)<br>
&nbsp; &nbsp; &nbsp;&gt; * Server provided libs (using Tattletale and JBoss Modules) to show<br>
&nbsp; &nbsp; &nbsp;&gt; which dependencies could be handled by a server module dependency)<br>
&nbsp; &nbsp; &nbsp;&gt;<br>
&nbsp; &nbsp; &nbsp;&gt; I'm not sure JBoss Modules contains any "directory" for<br>
&nbsp; &nbsp; &nbsp;&gt; which-modules-provides functionality but I guess the module root<br>
&nbsp; &nbsp; could<br>
&nbsp; &nbsp; &nbsp;&gt; be scanned and the resources indexed or something. Performance<br>
&nbsp; &nbsp; would not<br>
&nbsp; &nbsp; &nbsp;&gt; be an issue because it's still going to be faster that a user playing<br>
&nbsp; &nbsp; &nbsp;&gt; around with dependencies for days.<br>
&nbsp; &nbsp; &nbsp;&gt;<br>
&nbsp; &nbsp; &nbsp;&gt; Thoughts?<br>
&nbsp; &nbsp; &nbsp;&gt;<br>
&nbsp; &nbsp; &nbsp;&gt; --<br></div></div>
&nbsp; &nbsp; &nbsp;&gt; Nicklas Karlsson, <a href="tel:%2B358%2040%205062266" value="+358405062266" target="_blank">+358 40 5062266</a> &lt;tel:%2B358%2040%205062266&gt;<div class="im"><br>
&nbsp; &nbsp; &nbsp;&gt; Vaakunatie 10 as 7, 20780 Kaarina<br>
&nbsp; &nbsp; &nbsp;&gt;<br>
&nbsp; &nbsp; &nbsp;&gt;<br>
&nbsp; &nbsp; &nbsp;&gt;<br>
&nbsp; &nbsp; &nbsp;&gt; ______________________________<u></u>_________________<br>
&nbsp; &nbsp; &nbsp;&gt; wildfly-dev mailing list<br></div>
&nbsp; &nbsp; &nbsp;&gt; <a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.<u></u>jboss.org</a>&gt;<div class="im">
<br>
&nbsp; &nbsp; &nbsp;&gt; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/wildfly-dev</a><br>
<br>
<br>
&nbsp; &nbsp; --<br>
&nbsp; &nbsp; Alessio Soldano<br>
&nbsp; &nbsp; Web Service Lead, JBoss<br>
&nbsp; &nbsp; ______________________________<u></u>_________________<br>
&nbsp; &nbsp; wildfly-dev mailing list<br></div>
&nbsp; &nbsp; <a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.<u></u>jboss.org</a>&gt;<div class="im">
<br>
&nbsp; &nbsp; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/wildfly-dev</a><br>
<br>
<br>
<br>
<br>
--<br>
Nicklas Karlsson, <a href="tel:%2B358%2040%205062266" value="+358405062266" target="_blank">+358 40 5062266</a><br>
Vaakunatie 10 as 7, 20780 Kaarina<br>
<br>
<br></div><div class="im">
______________________________<u></u>_________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/wildfly-dev</a><br>
<br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Nicklas Karlsson, +358 40 5062266<div>Vaakunatie 10 as 7, 20780 Kaarina</div>
</div>
_______________________________________________<br>wildfly-dev mailing list<br><a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/wildfly-dev<br></blockquote></div><br></div></div></body></html>