I don&#39;t see the harm in prototyping this idea of auto-enablement. That&#39;s exactly what the Seam sandbox is for [1]. I think if someone has an approach, and other people in the community are interested in said approach, then we should allow that idea to bloom. That&#39;s the spirit of open source and community. Just because the experts deliberated over it and devised a solution which that group considers ideal does not mean that developers will just accept it. Maybe they want to include an extra JAR file. Let&#39;s let them decide what it best for them. We are certainly not spoiling the modules nor are we attempting to change CDI in any way. This is all in how you consume it.<div>
<br></div><div>So, without further bickering, let&#39;s allow the visionaries to carry on with their vision and see how it plays out. Developers can always choose to stick with beans.xml if they want to be purists.<br><div>
<br></div><div>-Dan</div><div><br></div><div>[1] <a href="http://anonsvn.jboss.org/repos/seam/sandbox/trunk/modules/">http://anonsvn.jboss.org/repos/seam/sandbox/trunk/modules/</a><br><div><br><div class="gmail_quote">On Mon, Mar 29, 2010 at 4:32 PM, Lincoln Baxter, III <span dir="ltr">&lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">For documentation (not conversation) purposes -- this approach has already been discussed:<br><br>/**<br>  * A small non-portable Weld PoC enabler that does not take many factors (incl. class runtime availability) into account:<br>

  */<br>public class SeamInterceptorEnablerExtension implements Extension<br>{<br>   public void beforeBeanDiscovery(@Observes final BeforeBeanDiscovery event, final BeanManager manager)<div class="im"><br>   {<br>      if (manager instanceof BeanManagerImpl)<br>

      {<br>         BeanManagerImpl impl = (BeanManagerImpl) manager;<br><br></div>         // Enable interceptors in order here<br>         // enableInterceptor(impl, YourInterceptor1.class);<br>
         // enableInterceptor(impl, YourInterceptor2.class);<br>
         // enableInterceptor(impl, YourInterceptor3.class); ... and more<br>      }<br>   }<br><br>   private void enableInterceptor(final BeanManagerImpl impl, final Class&lt;?&gt; type)<br>   {<br>      List&lt;Class&lt;?&gt;&gt; list = new ArrayList&lt;Class&lt;?&gt;&gt;();<br>

      list.addAll(impl.getEnabledInterceptorClasses());<br><br>      list.add(type);<br><br>      impl.setEnabledInterceptorClasses(list);<div><div></div><div class="h5"><br>   }<br>}<br><br><div class="gmail_quote">On Mon, Mar 29, 2010 at 4:02 PM, Nicklas Karlsson <span dir="ltr">&lt;<a href="mailto:nickarls@gmail.com" target="_blank">nickarls@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">It would probably work for us but would be non-portable, right?<div><br></div><div>*IF* we go down the route of auto-enablement, it would probably be easy to have the Seam 3 config @Injected into the extension and check from a field if the enabling is turned on or off (set in XML or wherever) so no need to exclude/include jars.<div>

<div></div><div><br>
<br><div class="gmail_quote">On Mon, Mar 29, 2010 at 10:50 PM, Ales Justin <span dir="ltr">&lt;<a href="mailto:ales.justin@gmail.com" target="_blank">ales.justin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">


<div>&gt;&gt; That&#39;s why the JAR is included by default via Maven -- or provided in the<br>
&gt;&gt; &quot;Dump these jars into your app&quot; folder that we have in the Dist-releases. No<br>
&gt;&gt; extra work required to include it.<br>
&gt;<br>
&gt; And so I repeat my question: how is this better than a pre-written XML<br>
&gt; file that is included by default?<br>
<br>
</div>What is required for a class to be interceptor?<br>
(haven&#39;t been in JEE world for a while :-))<br>
<br>
Does it need to implement some interface?<br>
Or is proper api enough -- e.g. a plain class which has the right method?<br>
(in JBoss AOP, afair, it was enough to have single param method &quot;invoke&quot; with InvocationContext param)<br>
<br>
Just asking on how to easily recognize the interceptors,<br>
since I&#39;ve just written a single-pass scanning MC lib [1],<br>
where it would be trivial to add recognized interceptors by default to Weld&#39; metadata.<br>
(we already do/add a bunch of default things for things we recognize as Weld in JBossAS/MC)<br>
<br>
But I guess we then introduce ordering issue?<br>
<br>
[1] - no more need to do multiple scans in diff JBossAS components<br>
e.g. Hibernate Scanner impl: <a href="http://anonsvn.jboss.org/repos/jbossas/projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/" target="_blank">http://anonsvn.jboss.org/repos/jbossas/projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/</a><br>



<div><div></div><div><br>
<br>
_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br>---<br>Nik<br>
</div>
<br>_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br></div></div><div><div></div><div class="h5">Lincoln Baxter, III<br><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&quot;Keep it Simple&quot;<br>

</div></div><br>_______________________________________________<br>
seam-dev mailing list<br>
<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br><a href="http://www.google.com/profiles/dan.j.allen">http://www.google.com/profiles/dan.j.allen</a><br>
</div></div></div>