Looks like I commented on it already.<br><br><div class="gmail_quote">On Thu, Sep 29, 2011 at 8:04 PM, Marius Bogoevici <span dir="ltr">&lt;<a href="mailto:mariusb@redhat.com">mariusb@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;">
Rich,<br>
<br>
Oh, so you were rather looking at something similar to Spring method<br>
injection?<br>
<br>
Perhaps I&#39;m reading your email in a hurry, but I think that<br>
<a href="https://issues.jboss.org/browse/CDI-110" target="_blank">https://issues.jboss.org/browse/CDI-110</a> (service handlers) provides<br>
support for doing just that.<br>
<br>
Cheers,<br>
<font color="#888888">Marius<br>
</font><div><div></div><div class="h5"><br>
On Thu, 2011-09-29 at 17:41 -0700, Richard wrote:<br>
&gt; Forgive the over explanation, just trying to be clear....<br>
&gt;<br>
&gt; An interceptor typically intercepts concrete classes.<br>
&gt; Say LibraryServiceImpl needs a LogInterceptor, or a TransactionInterceptor, or whatever.<br>
&gt;<br>
&gt; The interceptor is sort of a dynamic decorator design pattern instead of implementing the same interface as the service impl, it uses reflection constructs so that it can intercept any concrete class (ignore CDI decorators for a moment) with the same cross cutting service I.e, logging, transactions, security, etc.<br>

&gt;<br>
&gt;<br>
&gt; So later the same two interceptors can implement the BankServiceImpl (class).<br>
&gt;<br>
&gt;<br>
&gt; Ok at this point hopefully we are on the same page....<br>
&gt;<br>
&gt;<br>
&gt; What I am asking and hoping is that I can have an interceptor intercept calls to an interface like LibraryService and use the same constructs to provide an implementation of an arbitrary interface ( or any abstract class).<br>

&gt;<br>
&gt; Thus there is no final proceed. The interceptor is the implementation. So if I wanted to provide an interceptor that translated method calls into REST calls then I could have an interceptor called RESTInterceptor that decorates the LibraryService interface and I can intercept calls and turn those into rest calls for a remote client automatically where LibraryService is an interface and nor a class. I could also intercept calls to LibraryService with JMSInterceptor and implement the methods by sending JMS messages.<br>

&gt;<br>
&gt; In the past I used this technique with Spring interceptors to create methods on the fly that accessed JPA named queries. You could also do this with mixin support.<br>
&gt;<br>
&gt; The plumbing is there already. The leap from implementing interceptors for concrete classes to intercepting interfaces so that the interfaces have an implementation is not that far off in scope or implementation.<br>

&gt;<br>
&gt; AspectJ has it. Spring 1.0 has it. Spring 2 improved it. I think CDI should have it.<br>
&gt;<br>
&gt; I thought I saw someone discussing it for CDI 1.1 at some point and thought it would be in the summary.<br>
&gt;<br>
&gt; Questions<br>
&gt;<br>
&gt; 1 does cdi 1.0 have it and I just missed it?<br>
&gt; 2 does cdi 1.1 have it and I just missed it?<br>
&gt; 3 does cdi not have it?<br>
&gt;<br>
&gt; If it does not have it, can we table it for discussion.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Sent from my iPad<br>
&gt;<br>
&gt; On Sep 29, 2011, at 2:54 PM, Marius Bogoevici &lt;<a href="mailto:mariusb@redhat.com">mariusb@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Rick,<br>
&gt; &gt;<br>
&gt; &gt; On Thu, 2011-09-29 at 12:53 -0700, Rick Hightower wrote:<br>
&gt; &gt;&gt; My favorite new features is missing from the overview.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; :(<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Maybe it got dropped.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Can interceptors still implement interfaces?<br>
&gt; &gt;<br>
&gt; &gt; What would be special about implementing interfaces? Any class can be an<br>
&gt; &gt; interceptor as long as it is properly annotated, but then again, the<br>
&gt; &gt; fact that they implement an interface or not shouldn&#39;t have any<br>
&gt; &gt; particular meaning.<br>
&gt; &gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Thu, Sep 29, 2011 at 11:28 AM, Pete Muir &lt;<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>&gt; wrote:<br>
&gt; &gt;&gt;        Expert group<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;        Please review this draft:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;        <a href="http://docs.jboss.org/cdi/spec/1.1.EDR1/" target="_blank">http://docs.jboss.org/cdi/spec/1.1.EDR1/</a><br>
&gt; &gt;&gt;        <a href="http://docs.jboss.org/cdi/api/1.1.EDR1/" target="_blank">http://docs.jboss.org/cdi/api/1.1.EDR1/</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;        I would like to submit this to the JCP on Tuesday 4th October<br>
&gt; &gt;&gt;        as EDR1, but to do that I want your approval :-)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;        I am trying to stage the api jar as well as produce javadoc,<br>
&gt; &gt;&gt;        but the JBoss nexus isn&#39;t cooperating :-(<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;        JBoss Nexus now syncs the cdi-api to central, so this will<br>
&gt; &gt;&gt;        appear there shortly after Paul Gier beats Nexus into<br>
&gt; &gt;&gt;        submission with a big enough stick ;-)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;        I&#39;ll ping the group anyway.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;        Pete<br>
&gt; &gt;&gt;        _______________________________________________<br>
&gt; &gt;&gt;        cdi-dev mailing list<br>
&gt; &gt;&gt;        <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt;        <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; Rick Hightower<br>
&gt; &gt;&gt; <a href="tel:%28415%29%20968-9037" value="+14159689037">(415) 968-9037</a><br>
&gt; &gt;&gt; Profile<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; cdi-dev mailing list<br>
&gt; &gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><b>Rick Hightower</b><br>(415) 968-9037 <br><a href="http://www.google.com/profiles/RichardHightower" target="_blank">Profile</a> <br><br>