Hi<br>There&#39;s a bunch of small discrepancies like that between EJB and CDI. e.g <a href="http://java.net/jira/browse/GLASSFISH-16186" target="_blank">GF-16186</a> I reported one year ago which ended up on <a href="https://issues.jboss.org/browse/WELD-921" target="_blank">WELD-921</a>. And we also had isues with covariant methods on @Local interfaces in the past.<br>



<br>With CDI gradually percolating through all EE, one day or another - from EE7 I hope - EJB and CDI will have to behave the same way.<br><br>In the context of this WELD-1133 it would be preferable to align EJB on CDI, unless of course some important usecase gets harmed (but I don&#39;t see which). Else the spec clash will remain and in a few years users will keep wonrdering what we were thinking.<br>



<br>fm.<br><br><br><div class="gmail_quote">On Tue, Jun 5, 2012 at 5:50 PM, Martin Kouba <span dir="ltr">&lt;<a href="mailto:mkouba@redhat.com" target="_blank">mkouba@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">



Hi,<br>
<br>
recently we had an issue with regard to Session Bean business interface inheritance when running CDI TCK 1.0.4.SP3 on GlassFish - see also WELD-1133 [1]. The following discussion revealed possible specification conflict (EJB 3.1 vs CDI 1.0). Pete Muir asked me to write some brief summary. So here it is :-)<br>




<br>
The problem: it seems that session bean business interface inheritance is not allowed in EJB 3.1<br>
(4.9.2.1 Session Bean Superclasses)<br>
<br>
Let&#39;s assume this code:<br>
<br>
@Local<br>
interface Bar {}<br>
<br>
@Local<br>
interface Foo extends Bar {<br>
}<br>
<br>
@Stateless<br>
class FooBean implements Foo {<br>
}<br>
<br>
According to the spec (EJB 3.1) the set of exposed client views of FooBean should only be Foo. Not Foo and Bar.<br>
<br>
However the CDI spec defines bean types for a session bean in a following way: &quot;The unrestricted set of bean types for a session bean contains all local interfaces of the bean and their superinterfaces&quot; (3.2.2. Bean types of a session bean).<br>




<br>
Note that some EJB implementations DO support this kind of inheritance out of the box (e.g. JBoss AS 7 EJB module).<br>
<br>
Martin<br>
<br>
[1]<br>
<a href="https://issues.jboss.org/browse/WELD-1133" target="_blank">https://issues.jboss.org/browse/WELD-1133</a><br>
<span><font color="#888888"><br>
--<br>
Martin Kouba<br>
JBoss Quality Assurance Engineer<br>
E-mail: <a href="mailto:mkouba@redhat.com" target="_blank">mkouba@redhat.com</a><br>
Web: <a href="http://www.cz.redhat.com" target="_blank">www.cz.redhat.com</a><br>
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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></span></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.suntriprecords.com" target="_blank">http://www.suntriprecords.com</a><br><br>