tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Stateless inheritited bean is not found when Interface is not specified
Date Fri, 14 Mar 2008 22:47:56 GMT
On Mar 13, 2008, at 10:41 AM, <> <

 > wrote:

> Hello,
> NetworkStorageServiceImpl is a Stateless Local Bean.  
> AsyncNetworkStorageServiceImpl also, but extends this bean.
> When I do this:
> public class AsyncNetworkStorageServiceImpl extends  
> NetworkStorageServiceImpl
> the bean is not found.

This one is intentional.  If you want it to be a bean you have to use  
an @Stateless annotation on the class or declare it in xml.

Section 4.6.2. of EJB 3.0 Core states: "A session bean class must not  
have a superclass that is itself a session bean class."

The wording is terrible and we are fixing it in the EJB 3.1 spec.  The  
intended meaning is that you cannot inherit the act of being a bean.

> When I also specify the interface:
> public class AsyncNetworkStorageServiceImpl extends  
> NetworkStorageServiceImpl implements NetworkStorageService
> it works and the following entry is shown:
> INFO - Jndi(name=AsyncNetworkStorageServiceImplLocal) -->  
> Ejb(deployment-id=Asyn
> cNetworkStorageServiceImpl)

I assume you mean that the interface from the super class is not found  
unless explicitly declared in the child class.  That is not  
intentional.  I'll make sure that's fixed for the 3.0 final.


View raw message