This is so perfect. So this allow implementing proxies and mixins. You can specify an interface and then implement it else where (i.e., as a interceptor). <div><br></div><div>I think this is a huge feature for writing extensions.</div>
<div><br></div><div>With this feature, it should also be able to add mixins to any class. I.e., all of your domain classes implement create, read, update methods via mixins.</div><div><br></div><div>Make sure we don&#39;t exclude the mixin case.<br>
<br><div class="gmail_quote">On Wed, Apr 27, 2011 at 10:03 AM, Pete Muir (JIRA) <span dir="ltr">&lt;<a href="mailto:jira-events@lists.jboss.org">jira-events@lists.jboss.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
     [ <a href="https://issues.jboss.org/browse/CDI-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel" target="_blank">https://issues.jboss.org/browse/CDI-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel</a> ]<br>

<br>
Pete Muir reassigned CDI-110:<br>
-----------------------------<br>
<br>
    Assignee: George Gastaldi<br>
<br>
<br>
&gt; Provide support for binding an invocation handler to an interface or abstract class<br>
&gt; -----------------------------------------------------------------------------------<br>
&gt;<br>
&gt;                 Key: CDI-110<br>
&gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-110" target="_blank">https://issues.jboss.org/browse/CDI-110</a><br>
&gt;             Project: CDI Specification Issues<br>
&gt;          Issue Type: Feature Request<br>
&gt;          Components: Inheritance and Specialization<br>
&gt;    Affects Versions: 1.0<br>
&gt;            Reporter: George Gastaldi<br>
&gt;            Assignee: George Gastaldi<br>
&gt;              Labels: cdi<br>
&gt;             Fix For: 1.1 (Proposed)<br>
&gt;<br>
&gt;<br>
&gt; The purpose of this feature is to allow interfaces and abstract classes to be automatically implemented by an invocation handler to which all abstract method invocations are delegated. The invocation handler would get &quot;bound&quot; to the type using the same strategy as is used for interceptor binding.<br>

&gt; Binding type:<br>
&gt; {code:java}<br>
&gt; @Target({ METHOD, TYPE })<br>
&gt; @Retention(RetentionPolicy.RUNTIME)<br>
&gt; @ServiceHandlerBindingType<br>
&gt; public @interface EchoService {}<br>
&gt; {code}<br>
&gt; Invocation handler:<br>
&gt; {code:java}<br>
&gt; @ServiceHandlerBindingType<br>
&gt; @EchoService<br>
&gt; public class EchoServiceHandler {<br>
&gt;     @AroundInvoke<br>
&gt;     public Object invoke(InvocationContext ctx) {<br>
&gt;         return ctx.getMethod().getName().toString();<br>
&gt;     }<br>
&gt; }<br>
&gt; {code}<br>
&gt; Usage:<br>
&gt; {code:java}<br>
&gt; @EchoService<br>
&gt; public interface HelloWorld {<br>
&gt;    String helloWorld();<br>
&gt; }<br>
&gt; {code}<br>
<font color="#888888"><br>
--<br>
This message is automatically generated by JIRA.<br>
For more information on JIRA, see: <a href="http://www.atlassian.com/software/jira" target="_blank">http://www.atlassian.com/software/jira</a><br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br><b>Rick Hightower</b><br>(415) 968-9037 <br><a href="http://www.google.com/profiles/RichardHightower" target="_blank">Profile</a> <br><br>
</div>