I think AfterBeanDiscovery is enough (which is already in the spec) for the autoenablement extension, right?<div><br></div><div>We could cast the BeanManager parameter to BeanManagerImpl and enable (and perhaps sort) all org.seam.* interceptors etc that the BM is aware of. Since there is a limited number of CDI implementations, we could also cast to other implementations after checking (non-imported, reflection) which one we are dealing with.</div>
<div><br></div><div>We could also throw in a</div><div><br></div><div>@AutoEnable(before=&quot;org.jboss.seam.foo.Interceptor&quot;) </div><div><br></div><div>annotation if want to control the order manually or if we want to offer others to use this feature (in a seam context)</div>
<div><br><br><div class="gmail_quote">On Fri, Mar 26, 2010 at 7:35 PM, Dan Allen <span dir="ltr">&lt;<a href="mailto:dan.j.allen@gmail.com">dan.j.allen@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;">
<div class="gmail_quote"><div class="im">On Fri, Mar 26, 2010 at 1:28 PM, Dan Allen <span dir="ltr">&lt;<a href="mailto:dan.j.allen@gmail.com" target="_blank">dan.j.allen@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">

<div class="gmail_quote"><div><br></div><div><div>On Thu, Mar 25, 2010 at 11:25 PM, Nicklas Karlsson &lt;<a href="mailto:nickarls@gmail.com" target="_blank">nickarls@gmail.com</a>&gt; wrote:</div>
</div><div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


Perhaps I&#39;m missing something here but can&#39;t the ProcessModule event from 11.5.5 fix this with List&lt;Class&gt; getInterceptors()?</blockquote></div><div><br></div></div><div>Two things. First, the ProcessModule did not make CDI 1.0, but was added later. I&#39;m not sure if the version containing it has been &quot;released&quot; or approved. Second, that only gets you the interceptors. Lincoln and I were tricked by that a couple of times...what we need is to modify the <i>enabled</i> interceptors. That&#39;s where we keep getting bitten.</div>

</div></blockquote><div><br></div></div><div>Oops! I was wrong. It does give you read/write access to the enabled interceptors. Okay, so this would be a possibility to either add interceptors or warn the developer to add them. But this listener would have to still know about any and all interceptors that need to be enabled (if the modules beans.xml is empty as we want it to be).</div>

<div><br></div><div>So we could provide a seam-interceptor-enabler.jar that would enable any Seam interceptors on the classpath. We would only provide one such JAR file. This is the right way to go. It only requires that we depend on the latest version of the spec, which Weld doesn&#39;t yet support fully (not ProcessModule at least).</div>

<div><br></div><div>Therefore, we have two possible ways forward. The developer lists out the interceptors or we provide an enabler JAR. But remember, observer call order is not portable, so if you have another enabler JAR from another extension library, then how to order them gets tricky. The enabler really needs to be a closed system.</div>

<div><br></div><font color="#888888"><div>-Dan</div><div><br></div></font></div><div><div></div><div class="h5">-- <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" target="_blank">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br><a href="http://www.google.com/profiles/dan.j.allen" target="_blank">http://www.google.com/profiles/dan.j.allen</a><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>---<br>Nik<br>
</div>