<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>&nbsp;</DIV>
<DIV>How embarassing, the first time I send a message to this list&nbsp;I accidently send it before I was done writing, sorry....</DIV>
<DIV>---------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>I would maybe call the third case a 'subBean".</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have also run into a problem regarding decorators of 'subBeans'.</DIV>
<DIV>The problem is that if I create a decorator of a subBean then I currently have no way of calling methods in the 'superBean'.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I imagine that the spec may have to be extended with a DI annotation like&nbsp;@SuperBean (@SuperBean like the @Decorates&nbsp;annotation only it is set to a reference that delegates calls to the superBean instead of the the next method in the current stack of interceptors for the subBean).</DIV>
<DIV>@SuperBean would be used somelike this this...</DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=yshortcuts id=lw_1227893899_0 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">public&nbsp;interface</SPAN> BaseType {</DIV>
<DIV>&nbsp;&nbsp;&nbsp; public String getDescription();</DIV>
<DIV>}</DIV>
<DIV>public class <SPAN class=yshortcuts id=lw_1227893899_1>SubType</SPAN> extends BaseType {</DIV>
<DIV>}</DIV>
<DIV>@Decorator public BaseTypeImpl implements BaseType {</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; public String getDescription() { return "BaseType"; }</DIV>
<DIV>}</DIV>
<DIV>
<DIV>@Decorator public SubTypeImpl implements SubType {</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; @SuperBean superBean;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; public String getDescription() { return superBean.getDescription()+":SubType";</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>So, the following expressions should be true...</DIV>
<DIV>&nbsp;</DIV>
<DIV>Bean baseTypeBean= ....;</DIV>
<DIV>Bean superTypeBean= ....</DIV>
<DIV>&nbsp;</DIV>
<DIV>baseTypeBean.create().getDescription().equals("BaseType");</DIV>
<DIV>superTypeBean.create().getDescription().equals("BaseType:SubType");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>&nbsp;</DIV>
<DIV>&nbsp;<BR><BR>--- On <B>Thu, 11/27/08, Gavin King <I>&lt;gavin@hibernate.org&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Gavin King &lt;gavin@hibernate.org&gt;<BR>Subject: [webbeans-dev] Re: Patterns of reuse<BR>To: "Java Community Process JSR #299 Expert List" &lt;JSR-299-EG@jcp.org&gt;, "Matt Drees" &lt;matt.drees@gmail.com&gt;, "Scott Ferguson" &lt;ferg@caucho.com&gt;, "webbeans-dev@lists.jboss.org" &lt;webbeans-dev@lists.jboss.org&gt;<BR>Date: Thursday, November 27, 2008, 4:34 PM<BR><BR><PRE>On Thu, Nov 27, 2008 at 4:09 PM, Gavin King &lt;gavin@hibernate.org&gt; wrote:

&gt; In case 1, it doesn't really make sense to inherit any web beans
&gt; metadata to the subtype. In cases 2 and 3, it makes sense to inherit
&gt; everything that is not explicitly overridden.

Minor clarification: in case 3, it does not make sense to inherit
binding types - rather, the user should be forced to *explicitly*
redeclare the binding types.

In case 2, binding types are inherited.



-- 
Gavin King
gavin.king@gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
_______________________________________________
webbeans-dev mailing list
webbeans-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/webbeans-dev
</PRE></BLOCKQUOTE></td></tr></table><br>